Skip to main content

Posts

Showing posts with the label zig-zag

Zig-Zag & Spiral Traversal Of A Binary Tree Made Easy

Zig-Zag and Spiral Traversal of a Binary Tree are some of those problems which appear different but have a lot of things in common and thus, can also be solved easily using a common approach. Let's understand what a Zig-Zag & Spiral traversal exactly is : Zig-Zag traversal for the above binary tree is :                                                                                1                                                                            3      2             ...