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 pricingAnswer ancestor XOR queries with a trie that follows the DFS.
What this asks
Answer queries maximizing the XOR between a node's value and its ancestors' values.
Depth-first walk the tree inserting values on the way down and removing them on the way back, answering each query against the live trie.
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