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 number of edges between two given nodes.
What this asks
Find the number of edges between two given nodes.
Find their lowest common ancestor, then add the two depths and subtract twice the ancestor's depth.
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