<aside> 📚

Definitions:

<aside> ✍️ 经典Code

<aside> 🌵 Table of Contents

</aside>


Tree Traversal

<aside> ✍️ Binary Tree Traversal

Iterative Tree Traversal Logic:

Key Points:所有节点都需要没有遗漏的打印。每一轮的while loop代表当前处理的TreeNode cur。在每一层while loop遍历时,因为我们没有recursion call stack,不能直接压栈去处理当前层的node。那怎么去把当前碰到的root和 left and right subtree没有遗漏的处理?

<aside> 📌 易错点:

Date: June 23, 2023

Problem: PreOrder Traversal


Date: July 22, 2023

Problem: InOrder Traversal


Date: July 22, 2023

Problem: PostOrder Traversal


Date: July 22, 2023

Problem: Level Order Traversal