This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingPrefer the opposite child at every level and read off the XOR.
What this asks
Given a small bitwise trie, find the best opposite-bit path for one query.
At every level prefer the opposite child, otherwise take the matching one; the XOR bits fall out.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing