Path length between two values in a binary tree
Filed under LinkedIn
The question
Given a tree root and two values, find the length of the path between them, handling the case where both lie on the same path.
No write-up yet. Related questions below have one.
Related LinkedIn questions
Collected from public candidate posts and coding forums. Updated Nov 2026.