@@ -0,0 +1,577 @@
+/**%0A * Definition for a binary tree node.%0A * public class TreeNode %7B%0A *     int val;%0A *     TreeNode left;%0A *     TreeNode right;%0A *     TreeNode(int x) %7B val = x; %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    public List%3CInteger%3E preorderTraversal(TreeNode root) %7B%0A        List%3CInteger%3E result = new ArrayList%3CInteger%3E();%0A        if(root == null)%7B%0A            return result;%0A        %7Delse%7B%0A            result.add(root.val);%0A            result.addAll(preorderTraversal(root.left));%0A            result.addAll(preorderTraversal(root.right));%0A            return result;%0A        %7D%0A    %7D%0A%7D

Q144 Binary Tree Preorder Traversal