public static ArrayList<Integer> preorderTraversalIterative(TreeNode root) {
		ArrayList<Integer> preorder = new ArrayList<Integer>();
		
		if(root == null) {
			return preorder;
		}
		
		Stack<TreeNode> stack = new Stack<TreeNode>();
		
		stack.push(root);
		
		while(!stack.isEmpty()) {
			TreeNode node = stack.pop();
			preorder.add(node.val);
			
			if(node.right != null) {
				stack.push(node.right);
			}
			
			if(node.left != null) {
				stack.push(node.left);
			}
		}
		
		return preorder;
	}