← Amazon questions

Find tree diameter with at most single turn

Filed under Amazon

Given a binary tree, find the length of the longest path (diameter) that makes at most a single turn. A single turn means the path can go up and down once, or strictly traverse in valid parent-child…

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.