← Amazon questions

Diameter of a binary tree with at most one turn

Filed under Amazon

Find the diameter of a binary tree with the constraint that the path can have at most one turn. A turn is defined as changing direction from going up-left to up-right (or vice-versa, effectively…

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.