Tree

104. Maximum Depth of Binary Tree

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

752. Open the Lock

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

994. Rotting Oranges

994. Rotting Oranges 題目的說明 題目有說明的有,腐爛的橘子會影響旁邊的好橘子,好橘子會爛掉,如果好橘子相連的好橘子有和爛橘子相連,過了一段時間後也會爛掉,如果有橘子沒有和任何的爛橘子相鄰就不會壞掉。

428. Serialize and Deserialize N-ary Tree

428. Serialize and Deserialize N-ary Tree

572. Subtree of Another Tree

# Definition for a binary tree node. # class TreeNode: # def __init_

536. Construct Binary Tree from String

536. Construct Binary Tree from String 做這題之前可以先完成 606. Construct String

589. N-ary Tree Preorder Traversal

589. N-ary Tree Preorder Traversal """ # Definition for

606. Construct String from Binary Tree

606. Construct String from Binary Tree # Definition for a binary

105. Construct Binary Tree from Preorder and Inorder Traversal

105. Construct Binary Tree from Preorder and Inorder Traversal 題目給出前序遍歷以及中序遍歷的順序,

337. House Robber III

337. House Robber III 這一題是 198. House Robber 和 213.