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 pricingDecide whether every node has either two children or none.
What this asks
Decide whether every node has either two children or none.
Each node checks its own children: exactly one child fails the tree, two children recurse, zero is fine.
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