← Amazon questions

Tree path with highest number of bends

Filed under Amazon

Given a binary tree, find a root-to-leaf or node-to-node path that contains the highest number of direction changes (bends), where a bend occurs when the path switches from left to right or right to…

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.