Skip to content

Latest commit

 

History

History
43 lines (41 loc) · 4.46 KB

File metadata and controls

43 lines (41 loc) · 4.46 KB
title type
Tree
docs

Tree

Title Solution Difficulty Time Space 收藏
94. Binary Tree Inorder Traversal [Go]({{< relref "/ChapterFour/0094.Binary-Tree-Inorder-Traversal.md" >}}) Medium O(n) O(1)
96. Unique Binary Search Trees [Go]({{< relref "/ChapterFour/0096.Unique-Binary-Search-Trees.md" >}}) Medium O(n^2) O(n)
98. Validate Binary Search Tree [Go]({{< relref "/ChapterFour/0098.Validate-Binary-Search-Tree.md" >}}) Medium O(n) O(1)
99. Recover Binary Search Tree [Go]({{< relref "/ChapterFour/0099.Recover-Binary-Search-Tree.md" >}}) Hard O(n) O(1)
100. Same Tree [Go]({{< relref "/ChapterFour/0100.Same-Tree.md" >}}) Easy O(n) O(1)
101. Symmetric Tree [Go]({{< relref "/ChapterFour/0101.Symmetric-Tree.md" >}}) Easy O(n) O(1)
102. Binary Tree Level Order Traversal [Go]({{< relref "/ChapterFour/0102.Binary-Tree-Level-Order-Traversal.md" >}}) Medium O(n) O(1)
103. Binary Tree Zigzag Level Order Traversal [Go]({{< relref "/ChapterFour/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}}) Medium O(n) O(n)
104. Maximum Depth of Binary Tree [Go]({{< relref "/ChapterFour/0104.Maximum-Depth-of-Binary-Tree.md" >}}) Easy O(n) O(1)
107. Binary Tree Level Order Traversal II [Go]({{< relref "/ChapterFour/0107.Binary-Tree-Level-Order-Traversal-II.md" >}}) Easy O(n) O(1)
108. Convert Sorted Array to Binary Search Tree [Go]({{< relref "/ChapterFour/0108.Convert-Sorted-Array-to-Binary-Search-Tree.md" >}}) Easy O(n) O(1)
110. Balanced Binary Tree [Go]({{< relref "/ChapterFour/0110.Balanced-Binary-Tree.md" >}}) Easy O(n) O(1)
111. Minimum Depth of Binary Tree [Go]({{< relref "/ChapterFour/0111.Minimum-Depth-of-Binary-Tree.md" >}}) Easy O(n) O(1)
112. Path Sum [Go]({{< relref "/ChapterFour/0112.Path-Sum.md" >}}) Easy O(n) O(1)
113. Path Sum II [Go]({{< relref "/ChapterFour/0113.Path-Sum-II.md" >}}) Medium O(n) O(1)
114. Flatten Binary Tree to Linked List [Go]({{< relref "/ChapterFour/0114.Flatten-Binary-Tree-to-Linked-List.md" >}}) Medium O(n) O(1)
124. Binary Tree Maximum Path Sum [Go]({{< relref "/ChapterFour/0124.Binary-Tree-Maximum-Path-Sum.md" >}}) Hard O(n) O(1)
129. Sum Root to Leaf Numbers [Go]({{< relref "/ChapterFour/0129.Sum-Root-to-Leaf-Numbers.md" >}}) Medium O(n) O(1)
144. Binary Tree Preorder Traversal [Go]({{< relref "/ChapterFour/0144.Binary-Tree-Preorder-Traversal.md" >}}) Medium O(n) O(1)
145. Binary Tree Postorder Traversal [Go]({{< relref "/ChapterFour/0145.Binary-Tree-Postorder-Traversal.md" >}}) Hard O(n) O(1)
173. Binary Search Tree Iterator [Go]({{< relref "/ChapterFour/0173.Binary-Search-Tree-Iterator.md" >}}) Medium O(n) O(1)
199. Binary Tree Right Side View [Go]({{< relref "/ChapterFour/0199.Binary-Tree-Right-Side-View.md" >}}) Medium O(n) O(1)
222. Count Complete Tree Nodes [Go]({{< relref "/ChapterFour/0222.Count-Complete-Tree-Nodes.md" >}}) Medium O(n) O(1)
226. Invert Binary Tree [Go]({{< relref "/ChapterFour/0226.Invert-Binary-Tree.md" >}}) Easy O(n) O(1)
230. Kth Smallest Element in a BST [Go]({{< relref "/ChapterFour/0230.Kth-Smallest-Element-in-a-BST.md" >}}) Medium O(n) O(1)
235. Lowest Common Ancestor of a Binary Search Tree [Go]({{< relref "/ChapterFour/0235.Lowest-Common-Ancestor-of-a-Binary-Search-Tree.md" >}}) Easy O(n) O(1)
236. Lowest Common Ancestor of a Binary Tree [Go]({{< relref "/ChapterFour/0236.Lowest-Common-Ancestor-of-a-Binary-Tree.md" >}}) Medium O(n) O(1)
257. Binary Tree Paths [Go]({{< relref "/ChapterFour/0257.Binary-Tree-Paths.md" >}}) Easy O(n) O(1)
404. Sum of Left Leaves [Go]({{< relref "/ChapterFour/0404.Sum-of-Left-Leaves.md" >}}) Easy O(n) O(1)
437. Path Sum III [Go]({{< relref "/ChapterFour/0437.Path-Sum-III.md" >}}) Easy O(n) O(1)
515. Find Largest Value in Each Tree Row [Go]({{< relref "/ChapterFour/0515.Find-Largest-Value-in-Each-Tree-Row.md" >}}) Medium O(n) O(n)
637. Average of Levels in Binary Tree [Go]({{< relref "/ChapterFour/0637.Average-of-Levels-in-Binary-Tree.md" >}}) Easy O(n) O(n)
993. Cousins in Binary Tree [Go]({{< relref "/ChapterFour/0993.Cousins-in-Binary-Tree.md" >}}) Easy O(n) O(1)
--------------------------------------- --------------------------------- -------------------------- ----------------------- ----------- --------