Accepted iterative simplest solution in Java using stack.
public class Solution {\n        public List<Integer> preorderTraversal(TreeNode root) {\n            List<Integer> list = new LinkedList<Integer>();\n         
    public class Solution {\n        public List<Integer> preorderTraversal(TreeNode root) {\n            List<Integer> list = new LinkedList<Integer>();\n            Stack<TreeNode> stack = new Stack<TreeNode>();\n            if(root!=null) stack.push(root);\n            while(!stack.isEmpty()){\n                TreeNode node = stack.pop();\n                list.add(node.val);\n                if(node.right!=null) stack.push(node.right);\n                if(node.left!=null) stack.push(node.left);\n            }\n            return list;\n        }\n    }
['Java']