public static ArrayList<ArrayList<Integer>> zigzagLevelOrder2(TreeNode root) {
		ArrayList<ArrayList<Integer>> resultLists = new ArrayList<ArrayList<Integer>>();
		if (root == null) {
			return resultLists;
		}
		Stack<TreeNode> currentLevel = new Stack<TreeNode>();
		currentLevel.push(root);
		Boolean leftToRight = false;
		while (!currentLevel.isEmpty()) {
			Stack<TreeNode> nextLevel = new Stack<TreeNode>();
			ArrayList<Integer> newList = new ArrayList<Integer>();
			while(!currentLevel.isEmpty()){
				TreeNode node = currentLevel.pop();
				newList.add(node.val);
				if(leftToRight){
					if(node.right != null) nextLevel.add(node.right);
					if(node.left != null) nextLevel.add(node.left);
				}else{
					if(node.left != null) nextLevel.add(node.left);
					if(node.right != null) nextLevel.add(node.right);
				}
			}
			leftToRight = !leftToRight;
			resultLists.add(newList);
			currentLevel = nextLevel;
		}
		return resultLists;
	}