Binary Tree Inorder Traversal
public List<Integer> inorderTraversal(TreeNode root) {
List<Integer> list = new ArrayList<>();
t(root, list);
return list;
}
public void t(TreeNode root, List<Integer> list) {
if (root == null) return;
t(root.left, list);
list.add(root.val);
t(root.right, list);
}
标签:return,list,List,94,public,easy,root,leetcode
From: https://www.cnblogs.com/iyiluo/p/16789182.html