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

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

July 27, 2021 · 2 min · zhengcf

leetcode-96 - Unique Binary Search Trees

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

July 24, 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-98 - Validate Binary Search Tree

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

July 20, 2021 · 1 min · zhengcf

leetcode-108 - Convert Sorted Array to Binary Search Tree

動機 複習dfs ...

July 18, 2021 · 1 min · zhengcf

leetcode-230 - Kth Smallest Element in a BST

動機 不要被BST誤導阿!!! 一直往O(log(n))的方向去想 ...

January 31, 2021 · 1 min · zhengcf

leetcode-653 - Two Sum IV - Input is a BST

動機 主要是紀錄在tree上做這題的做法 ...

January 30, 2021 · 2 min · zhengcf

leetcode-703 - Kth Largest Element in a Stream

動機 當初想的太複雜了,還想用兩個heap ...

January 1, 2021 · 1 min · zhengcf