private void composeZigZagLevels(Stack<TreeNode> oddLevel, Stack<TreeNode> evenLevel, int level,
    		List<List<Integer>> results){
    	if(oddLevel.empty() && evenLevel.empty()){
    		return;
    	}
    	else{
			List<Integer> res = new ArrayList<Integer>();
    		if(level%2==0){
    			while(!evenLevel.empty()){
    				TreeNode temp = evenLevel.pop();
    				res.add(temp.val);
    				if(temp.left!=null){
    				    oddLevel.push(temp.left);
    				}
                    if(temp.right!=null){
                        oddLevel.push(temp.right);
                    }    				
    			}
    		}
    		else{
    			while(!oddLevel.empty()){
    				TreeNode temp = oddLevel.pop();
    				res.add(temp.val);
    				if(temp.right!=null){
    				    evenLevel.push(temp.right);
    				}
    				if(temp.left!=null){
    				    evenLevel.push(temp.left);
    				}    				    			
    			}
    		}
			level++;
			results.add(res);
			composeZigZagLevels(oddLevel, evenLevel, level, results);
			return;
    	}    	
    }