摘要: //后序遍历 public class Solution { //递归 public List<Integer> postorder(TreeNode root){ List<Integer> res=new ArrayList<>(); recur(root,res); return res; } 阅读全文
posted @ 2021-02-26 14:20 ForMei 阅读(87) 评论(0) 推荐(0)
摘要: //中序遍历 public class Solution{ public List<Integer> inorder(TreeNode root){ //递归 List<Integer> res=new ArrayList<>(); recur(root,res); return res; } pu 阅读全文
posted @ 2021-02-26 14:18 ForMei 阅读(50) 评论(0) 推荐(0)