public void postorderTraversalIterative(ArrayList<Integer> list, TreeNode node){
    	Stack<TreeNode> stack = new Stack<TreeNode>();
    	
    	while(true){
    		if(node != null){
    			if(node.right != null) stack.push(node.right);
    			stack.push(node);
    			node = node.left;
    			continue;
    		}
    		
    		if(stack.isEmpty()) return;
    			
    		node = stack.pop();
    		
    		if(node.right != null && !stack.isEmpty() && node.right == stack.peek()){
    			stack.pop();
    			stack.push(node);
    			node = node.right;
    		}else{
    			list.add(node.val);
    			node = null;
    		}
    	}
    }