leetcode-1038 - Binary Search Tree to Greater Sum Tree

動機 順著走就好 ...

September 13, 2021 · 1 min · zhengcf

leetcode-1448 - Count Good Nodes in Binary Tree

動機 就dfs傳範圍 ...

August 20, 2021 · 1 min · zhengcf

leetcode-1339 - Maximum Product of Splitted Binary Tree

動機 把不要的扣掉!! ...

August 19, 2021 · 1 min · zhengcf

leetcode-1361 - Validate Binary Tree Nodes

動機 把需要的spec定義出來就好 ...

August 14, 2021 · 1 min · zhengcf

leetcode-450 - Delete Node in a BST

動機 找右邊的最小,之後重建tree ...

August 10, 2021 · 2 min · zhengcf

leetcode-1008 - Construct Binary Search Tree from Preorder Traversal

動機 你大神還是你大神,滿滿的創意 在BST上做bsearch(太神啦) 帶入範圍 ...

August 10, 2021 · 2 min · zhengcf

leetcode-501 - Find Mode in Binary Search Tree

動機 BST的inorder就是sort過的list!! 忘了!! ...

August 10, 2021 · 2 min · zhengcf

leetcode-404 - Sum of Left Leaves

動機 不管right leaf的dfs ...

August 10, 2021 · 1 min · zhengcf

leetcode-107 - Binary Tree Level Order Traversal II

動機 就bfs ...

August 5, 2021 · 1 min · zhengcf

leetcode-117 - Populating Next Right Pointers in Each Node II

動機 用已經建成的next去連,所以遞迴方式變得很有趣 ...

August 1, 2021 · 1 min · zhengcf