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 pricingFind the deepest level of a tree whose nodes may have any number of children.
What this asks
Find the deepest level of a tree whose nodes may have any number of children.
Same walk, a loop instead of left and right: 1 + the maximum over every child's answer.
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