LeetCode

126. Word Ladder II

126. Word Ladder II 做這一題之前要先了解 127. Word Ladder 。這一題稍微不一樣的是,我們要舉出所有的路徑。

269. Alien Dictionary

269. Alien Dictionary TODO class Solution: def alienOrder(self, words:

246. Strobogrammatic Number

246. Strobogrammatic Number 英文單字補充:Strobogrammatic Number 一個數字經過 180 旋轉後,如果還是一個合法的數字,

726. Number of Atoms

726. Number of Atoms 這一題的關鍵在於我們要知道怎麼把元素與價數分離出來。 頗析出來後就是用遞迴的方式來寫。 class Solution: def countOfAtoms(

1373. Maximum Sum BST in Binary Tree

1371. Maximum Sum BST in Binary Tree # Definition for a

94. Binary Tree Inorder Traversal

94. Binary Tree Inorder Traversal # Definition for a binary tree

222. Count Complete Tree Nodes

222. Count Complete Tree Nodes 線性搜索 # Definition for a binary

559. Maximum Depth of N-ary Tree

559. Maximum Depth of N-ary Tree """ # Definition

261. Graph Valid Tree

261. Graph Valid Tree 題目給定一個數字 n 和一個陣列,n 代表的是一個圖中,所用有的節點數量,

106. Construct Binary Tree from Inorder and Postorder Traversal

106. Construct Binary Tree from Inorder and Postorder Traversal postorder