← Amazon questions

Vertical line zigzag traversal of binary tree

Filed under Amazon

Perform a vertical order traversal of a binary tree, but alternate the vertical column direction (top-to-bottom for even columns, bottom-to-top for odd).

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.