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-417 - Pacific Atlantic Water Flow

動機 要用dfs(+dp)要注意會不會重複走 ...

July 22, 2021 · 2 min · zhengcf

leetcode-207 - Course Schedule

動機 複習dfs 話說原來有擋修是這麼麻煩的事 ...

July 21, 2021 · 2 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