leetcode-124 - Binary Tree Maximum Path Sum

動機 十分有趣 ...

July 20, 2021 · 1 min · zhengcf

leetcode-572 - Subtree of Another Tree

動機 老實地分成兩個dfs ...

July 20, 2021 · 2 min · zhengcf

leetcode-98 - Validate Binary Search Tree

動機 當初還想著怎麼看node… ...

July 20, 2021 · 1 min · zhengcf

leetcode-106 - Construct Binary Tree from Inorder and Postorder Traversal

動機 把105改一下 ...

July 20, 2021 · 1 min · zhengcf

leetcode-105 - Construct Binary Tree from Preorder and Inorder Traversal

動機 複習inorder與preorder 可以順便看106 ...

July 20, 2021 · 1 min · zhengcf

leetcode-103 - Binary Tree Zigzag Level Order Traversal

動機 因為102的走是用level來分,所以這裡當輸出改變的時候就不用改太多 ...

July 19, 2021 · 1 min · zhengcf

leetcode-102 - Binary Tree Level Order Traversal

動機 複習bfs ...

July 19, 2021 · 1 min · zhengcf

leetcode-111 - Minimum Depth of Binary Tree

動機 複習dfs ...

July 18, 2021 · 1 min · zhengcf

leetcode-108 - Convert Sorted Array to Binary Search Tree

動機 複習dfs ...

July 18, 2021 · 1 min · zhengcf

leetcode-226 - Invert Binary Tree

動機 寫的時候忘了這是交換… ...

July 17, 2021 · 1 min · zhengcf