leetcode-1305 - All Elements in Two Binary Search Trees

動機 應該可以改成iterator各自的BST,但很麻煩,就直接攤平吧 ...

July 30, 2022 · 1 min · zhengcf

leetcode-530 - Minimum Absolute Difference in BST

動機 dfs回傳最大的子節點 ...

July 30, 2022 · 1 min · zhengcf

leetcode-538 - Convert BST to Greater Tree

動機 post order traversal ...

July 30, 2022 · 1 min · zhengcf

leetcode-449 - Serialize and Deserialize BST

動機 因為是BST情況就沒有那麼複雜 ...

July 30, 2022 · 1 min · zhengcf

leetcode-701 - Insert into a Binary Search Tree

動機 用rebuild的思維 ...

September 13, 2021 · 1 min · zhengcf

leetcode-1373 - Maximum Sum BST in Binary Tree

動機 post order很重要!! ...

September 13, 2021 · 2 min · zhengcf

leetcode-1038 - Binary Search Tree to Greater Sum Tree

動機 順著走就好 ...

September 13, 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