private static void zigzagTraversal(TreeNode root) {
		Stack<TreeNode> s1 = new Stack<TreeNode>();
		Stack<TreeNode> s2 = new Stack<TreeNode>();
		s1.push(root);
		TreeNode temp;
		while (true) {
			while (!s1.isEmpty()) {
				temp = s1.pop();
				System.out.print(temp.data + " ");
				if (temp.right != null)
					s2.push(temp.right);
				if (temp.left != null)
					s2.push(temp.left);
			}
			while (!s2.isEmpty()) {
				temp = s2.pop();
				System.out.print(temp.data + " ");
				if (temp.left != null)
					s1.push(temp.left);
				if (temp.right != null)
					s1.push(temp.right);
			}
			if (s1.isEmpty() && s2.isEmpty())
				break;
		}

	}