โ† Amazon questions

Spiral traversal of n-ary tree

Filed under Amazon

Given an n-ary tree, return the spiral (zigzag) level order traversal of its nodes' values. That is, level 1 is left-to-right, level 2 is right-to-left, and so on.

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.