To print out a binary tree is one of the most important help to check and dry-run through steps when working with binary tree graph algo.
Some simple tricks of shifting binary 1 and 0 around and using and (&), or (|) operators could help a lot with eliminating the use of arrays and data structure when implementing a checking algorithm. Operators Precedence postfix expr++ expr– unary ++expr –expr +expr -expr ~ ! multiplicative * / % additive + – shift << >> >>> relational <…Details
Toggle bit vector for ith bit base on some condition can be a very elegant way to save space and solve a computer problem.