โ† Amazon questions

Longest leaf to leaf path in a Binary tree

Filed under Amazon

Given a binary tree, find the length (or path) of the longest path between any two leaves in the tree. The path does not necessarily need to pass through the root.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.