Knowing basic logical equalities might be able to save a couple bytes. For instance, instead of if (!(a&&b)){}
try instead using DeMorgan's law if (!a||!b){}
. The same applies to bitwise functions: instead of ~(a|b)
do ~a&~b
.
↧
Answer by tox123 for Tips for golfing in C
↧