摘要: 非递归的遍历模板 1.先序遍历 根左右 Stack<TreeNode> stack = new Stack<>(); while(!stack.isEmpty() || root != null){ while(root != null){ visit(根节点) stack.push(root); 阅读全文
posted @ 2021-09-03 01:10 INnoVation-V2 阅读(40) 评论(0) 推荐(0) 编辑