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 pricingGive every subtree a signature while walking, and report the shapes that appear twice.
What this asks
Report every distinct subtree shape that appears at least twice.
Give each subtree a signature (its serialized form, or a small id assigned through a map) while walking postorder, and count the repeats.
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