← Walmart questions
CodingReported in a candidate post, Jul 2025

Print a binary tree in spiral order

Filed under Walmart · Also reported at Citrix, Moonfrog Labs

Given the root of a binary tree, return its level-order traversal in spiral (zigzag) order: the first level left to right, the next right to left, and so on alternating. Some versions start 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 Walmart questions

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