leetcode-863 - All Nodes Distance K in Binary Tree

動機 轉成graph錯了嗎 ...

July 31, 2021 · 1 min · zhengcf

leetcode-113 - Path Sum II

動機 就base case特別一點的遞迴,要自己把最後一個加上去 ...

July 31, 2021 · 1 min · zhengcf

leetcode-654 - Maximum Binary Tree

動機 這應該是easy吧 ...

July 31, 2021 · 2 min · zhengcf

leetcode-662 - Maximum Width of Binary Tree

動機 忘了可以上index,要算距離就是index!! ...

July 31, 2021 · 2 min · zhengcf

leetcode-637 - Average of Levels in Binary Tree

動機 複習bfs ...

July 29, 2021 · 1 min · zhengcf

leetcode-1569 - Number of Ways to Reorder Array to Get Same BST

動機 很有趣的問題,原來python有可以直接算combination的函數… ...

July 27, 2021 · 2 min · zhengcf

leetcode-110 - Balanced Binary Tree

動機 多回傳值的dfs ...

July 27, 2021 · 1 min · zhengcf

leetcode-116 - Populating Next Right Pointers in Each Node

動機 畫裡面那一個橢圓,很有趣 ...

July 25, 2021 · 1 min · zhengcf

leetcode-114 - Flatten Binary Tree to Linked List

動機 preorder的tree threading ...

July 24, 2021 · 1 min · zhengcf

leetcode-199 - Binary Tree Right Side View

動機 複習bfs ...

July 24, 2021 · 1 min · zhengcf