LeetCode

117. Populating Next Right Pointers in Each Node II

117. Populating Next Right Pointers in Each Node II "

1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree

1379. Find a Corresponding Node of a Binary Tree in

116. Populating Next Right Pointers in Each Node

116. Populating Next Right Pointers in Each Node 這一題要考的點是對進行 BFS

700. Search in a Binary Search Tree

700. Search in a Binary Search Tree 如果說題目只是問「樹」中是否存在一個節點有某個值,

450. Delete Node in a BST

450. Delete Node in a BST 這個題目給定的條件可以很簡單:給定一個數值,要我們在二元搜尋樹中找到哪個節點的數值等於此值,並且刪掉他。

752. Open the Lock

752. Open the Lock class Solution: def openLock(self, deadends:

104. Maximum Depth of Binary Tree

104. Maximum Depth of Binary Tree # Definition for a binary

652. Find Duplicate Subtrees

652. Find Duplicate Subtrees 建議先做過 536. Construct Binary Tree from

113. Path Sum II

113. Path Sum II 這一題比較困難的是,雖然是樹的遍歷加上回溯法。 # Definition for a binary

417. Pacific Atlantic Water Flow

417. Pacific Atlantic Water Flow 廣度優先搜索 BFS 也可以利用一次把多個點加入 queue 後再開始出發,