public void traverse(TreeNode root, int level){
    	if(lists.size() == level){
    		lists.add(new ArrayList<Integer>());
    	}

    	if(level % 2 == 0){
    		lists.get(level).add(root.val);
    	}else{
    		lists.get(level).add(0, root.val);
    	}

    	if(root.left != null) traverse(root.left, level + 1);
    	if(root.right != null) traverse(root.right, level + 1);
    }