← Cisco questions
CodingReported in a candidate post, Nov 2020

Zigzag level-order traversal with a direction flag

Filed under Cisco

Perform a zigzag level-order traversal of a binary tree. The traversal alternates direction at each level. Add a boolean flag to control the initial direction (True for left-to-right, False for…

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 Cisco questions

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