← Amazon questions

Longest path with one bend

Filed under Amazon

Given a binary tree, find the length of the longest path that contains at most one bend (a change in direction between left and right child pointers), where a path consists of a sequence of connected…

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.