← Walmart questions

Spiral level order traversal of a binary tree

Filed under Walmart

Perform a spiral (zigzag) level-order traversal of a binary tree. The first level is printed left-to-right, the second right-to-left, the third left-to-right, 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 Walmart questions

Collected from public candidate posts and coding forums. Updated Nov 2026.