leetcode-96 - Unique Binary Search Trees

動機 當成range,就可以去二分了 ...

July 24, 2021 · 1 min · zhengcf

leetcode-337 - House Robber III

動機 樹型dp 用sum(list of list,[])去攤平一層 ...

July 24, 2021 · 1 min · zhengcf

leetcode-437 - Path Sum III

動機 原來是prefix sum的靈壓!! ...

July 24, 2021 · 2 min · zhengcf

leetcode-236 - Lowest Common Ancestor of a Binary Tree

動機 我忘了localty ...

July 23, 2021 · 2 min · zhengcf

leetcode-94 - Binary Tree Inorder Traversal

動機 中序的英文是inorder,一開始寫以為是前序 ...

July 23, 2021 · 1 min · zhengcf

leetcode-101 - Symmetric Tree

動機 複習bfs ...

July 23, 2021 · 1 min · zhengcf

leetcode-235 - Lowest Common Ancestor of a Binary Search Tree

動機 善用binary search tree,所以才是easy ...

July 20, 2021 · 1 min · zhengcf

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