← ALL NOTES
Tree

103. Binary Tree Zigzag Level Order Traversal

The traversal is a completely ordinary left-to-right BFS — the only thing that changes per level is where you write each value. Instead of building each level then reversing the odd ones, pre-size…

Loading…