Phase 1: Find the longest path in this tree.

Given a binary tree, return the longest path between any two nodes -- measured in edges. The path doesn't have to pass through the root. Simple enough?

FIG. 1 — THE TREE AND ITS HIDDEN HIGHWAY

Pick two leaf nodes (2, 8, or 9) as the endpoints of the longest path:

— Tap two leaf nodes to mark the longest path you can find —