CPP program to print Zig - Zag traversal in groups of size 2.
#include <iostream> NEW_LINE #include <stack> NEW_LINE #include <queue> NEW_LINE using namespace std ; #define LEFT  0 NEW_LINE #define RIGHT  1 NEW_LINE #define ChangeDirection ( Dir )  ((Dir) = 1 - (Dir))