Skip to content

Commit 4268f58

Browse files
committed
Add solution 0429
1 parent a43125d commit 4268f58

20 files changed

+307
-89
lines changed

README.md

Lines changed: 60 additions & 60 deletions
Large diffs are not rendered by default.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package leetcode
2+
3+
/**
4+
* Definition for a Node.
5+
* type Node struct {
6+
* Val int
7+
* Children []*Node
8+
* }
9+
*/
10+
11+
type Node struct {
12+
Val int
13+
Children []*Node
14+
}
15+
16+
func levelOrder(root *Node) [][]int {
17+
var res [][]int
18+
var temp []int
19+
if root == nil {
20+
return res
21+
}
22+
queue := []*Node{root, nil}
23+
for len(queue) > 1 {
24+
node := queue[0]
25+
queue = queue[1:]
26+
if node == nil {
27+
queue = append(queue, nil)
28+
res = append(res, temp)
29+
temp = []int{}
30+
} else {
31+
temp = append(temp, node.Val)
32+
if len(node.Children) > 0 {
33+
queue = append(queue, node.Children...)
34+
}
35+
}
36+
}
37+
res = append(res, temp)
38+
return res
39+
}

leetcode/0429.N-ary-Tree-Level-Order-Traversal/429. N-ary Tree Level Order Traversal_test.go

Whitespace-only changes.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# [429. N-ary Tree Level Order Traversal](https://leetcode.com/problems/n-ary-tree-level-order-traversal/)
2+
3+
4+
## 题目
5+
6+
Given an n-ary tree, return the *level order* traversal of its nodes' values.
7+
8+
*Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null value (See examples).*
9+
10+
**Example 1:**
11+
12+
![https://assets.leetcode.com/uploads/2018/10/12/narytreeexample.png](https://assets.leetcode.com/uploads/2018/10/12/narytreeexample.png)
13+
14+
```
15+
Input: root = [1,null,3,2,4,null,5,6]
16+
Output: [[1],[3,2,4],[5,6]]
17+
18+
```
19+
20+
**Example 2:**
21+
22+
![https://assets.leetcode.com/uploads/2019/11/08/sample_4_964.png](https://assets.leetcode.com/uploads/2019/11/08/sample_4_964.png)
23+
24+
```
25+
Input: root = [1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14]
26+
Output: [[1],[2,3,4,5],[6,7,8,9,10],[11,12,13],[14]]
27+
28+
```
29+
30+
**Constraints:**
31+
32+
- The height of the n-ary tree is less than or equal to `1000`
33+
- The total number of nodes is between `[0, 104]`
34+
35+
## 题目大意
36+
37+
给定一个 N 叉树,返回其节点值的层序遍历。(即从左到右,逐层遍历)。树的序列化输入是用层序遍历,每组子节点都由 null 值分隔(参见示例)。
38+
39+
## 解题思路
40+
41+
- 这是 n 叉树的系列题,第 589 题也是这一系列的题目。这一题思路不难,既然是层序遍历,用 BFS 解答。
42+
43+
## 代码
44+
45+
```go
46+
package leetcode
47+
48+
/**
49+
* Definition for a Node.
50+
* type Node struct {
51+
* Val int
52+
* Children []*Node
53+
* }
54+
*/
55+
56+
type Node struct {
57+
Val int
58+
Children []*Node
59+
}
60+
61+
func levelOrder(root *Node) [][]int {
62+
var res [][]int
63+
var temp []int
64+
if root == nil {
65+
return res
66+
}
67+
queue := []*Node{root, nil}
68+
for len(queue) > 1 {
69+
node := queue[0]
70+
queue = queue[1:]
71+
if node == nil {
72+
queue = append(queue, nil)
73+
res = append(res, temp)
74+
temp = []int{}
75+
} else {
76+
temp = append(temp, node.Val)
77+
if len(node.Children) > 0 {
78+
queue = append(queue, node.Children...)
79+
}
80+
}
81+
}
82+
res = append(res, temp)
83+
return res
84+
}
85+
```

website/content/ChapterFour/0400~0499/0424.Longest-Repeating-Character-Replacement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ func max(a int, b int) int {
8888
----------------------------------------------
8989
<div style="display: flex;justify-content: space-between;align-items: center;">
9090
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0400~0499/0423.Reconstruct-Original-Digits-from-English/">⬅️上一页</a></p>
91-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0400~0499/0433.Minimum-Genetic-Mutation/">下一页➡️</a></p>
91+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0400~0499/0429.N-ary-Tree-Level-Order-Traversal/">下一页➡️</a></p>
9292
</div>
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# [429.N-ary Tree Level Order Traversal](https://leetcode.com/problems/n-ary-tree-level-order-traversal/)
2+
3+
4+
## 题目
5+
6+
Given an n-ary tree, return the *level order* traversal of its nodes' values.
7+
8+
*Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null value (See examples).*
9+
10+
**Example 1:**
11+
12+
![https://assets.leetcode.com/uploads/2018/10/12/narytreeexample.png](https://assets.leetcode.com/uploads/2018/10/12/narytreeexample.png)
13+
14+
```
15+
Input: root = [1,null,3,2,4,null,5,6]
16+
Output: [[1],[3,2,4],[5,6]]
17+
18+
```
19+
20+
**Example 2:**
21+
22+
![https://assets.leetcode.com/uploads/2019/11/08/sample_4_964.png](https://assets.leetcode.com/uploads/2019/11/08/sample_4_964.png)
23+
24+
```
25+
Input: root = [1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14]
26+
Output: [[1],[2,3,4,5],[6,7,8,9,10],[11,12,13],[14]]
27+
28+
```
29+
30+
**Constraints:**
31+
32+
- The height of the n-ary tree is less than or equal to `1000`
33+
- The total number of nodes is between `[0, 104]`
34+
35+
## 题目大意
36+
37+
给定一个 N 叉树,返回其节点值的层序遍历。(即从左到右,逐层遍历)。树的序列化输入是用层序遍历,每组子节点都由 null 值分隔(参见示例)。
38+
39+
## 解题思路
40+
41+
- 这是 n 叉树的系列题,第 589 题也是这一系列的题目。这一题思路不难,既然是层序遍历,用 BFS 解答。
42+
43+
## 代码
44+
45+
```go
46+
package leetcode
47+
48+
/**
49+
* Definition for a Node.
50+
* type Node struct {
51+
* Val int
52+
* Children []*Node
53+
* }
54+
*/
55+
56+
type Node struct {
57+
Val int
58+
Children []*Node
59+
}
60+
61+
func levelOrder(root *Node) [][]int {
62+
var res [][]int
63+
var temp []int
64+
if root == nil {
65+
return res
66+
}
67+
queue := []*Node{root, nil}
68+
for len(queue) > 1 {
69+
node := queue[0]
70+
queue = queue[1:]
71+
if node == nil {
72+
queue = append(queue, nil)
73+
res = append(res, temp)
74+
temp = []int{}
75+
} else {
76+
temp = append(temp, node.Val)
77+
if len(node.Children) > 0 {
78+
queue = append(queue, node.Children...)
79+
}
80+
}
81+
}
82+
res = append(res, temp)
83+
return res
84+
}
85+
```
86+
87+
88+
----------------------------------------------
89+
<div style="display: flex;justify-content: space-between;align-items: center;">
90+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0400~0499/0424.Longest-Repeating-Character-Replacement/">⬅️上一页</a></p>
91+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0400~0499/0433.Minimum-Genetic-Mutation/">下一页➡️</a></p>
92+
</div>

website/content/ChapterFour/0400~0499/0433.Minimum-Genetic-Mutation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,6 @@ func convert(gene string) uint32 {
185185

186186
----------------------------------------------
187187
<div style="display: flex;justify-content: space-between;align-items: center;">
188-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0400~0499/0424.Longest-Repeating-Character-Replacement/">⬅️上一页</a></p>
188+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0400~0499/0429.N-ary-Tree-Level-Order-Traversal/">⬅️上一页</a></p>
189189
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0400~0499/0435.Non-overlapping-Intervals/">下一页➡️</a></p>
190190
</div>

website/content/ChapterTwo/Array.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ weight: 1
191191
|0713|Subarray Product Less Than K|[Go]({{< relref "/ChapterFour/0700~0799/0713.Subarray-Product-Less-Than-K.md" >}})|Medium| O(n)| O(1)||41.2%|
192192
|0714|Best Time to Buy and Sell Stock with Transaction Fee|[Go]({{< relref "/ChapterFour/0700~0799/0714.Best-Time-to-Buy-and-Sell-Stock-with-Transaction-Fee.md" >}})|Medium| O(n)| O(1)||59.0%|
193193
|0717|1-bit and 2-bit Characters|[Go]({{< relref "/ChapterFour/0700~0799/0717.1-bit-and-2-bit-Characters.md" >}})|Easy||||46.3%|
194-
|0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||51.0%|
194+
|0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||51.1%|
195195
|0719|Find K-th Smallest Pair Distance|[Go]({{< relref "/ChapterFour/0700~0799/0719.Find-K-th-Smallest-Pair-Distance.md" >}})|Hard||||33.2%|
196196
|0720|Longest Word in Dictionary|[Go]({{< relref "/ChapterFour/0700~0799/0720.Longest-Word-in-Dictionary.md" >}})|Medium||||49.9%|
197197
|0721|Accounts Merge|[Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}})|Medium||||53.4%|
@@ -250,7 +250,7 @@ weight: 1
250250
|0927|Three Equal Parts|[Go]({{< relref "/ChapterFour/0900~0999/0927.Three-Equal-Parts.md" >}})|Hard||||39.1%|
251251
|0928|Minimize Malware Spread II|[Go]({{< relref "/ChapterFour/0900~0999/0928.Minimize-Malware-Spread-II.md" >}})|Hard||||41.6%|
252252
|0930|Binary Subarrays With Sum|[Go]({{< relref "/ChapterFour/0900~0999/0930.Binary-Subarrays-With-Sum.md" >}})|Medium||||46.3%|
253-
|0942|DI String Match|[Go]({{< relref "/ChapterFour/0900~0999/0942.DI-String-Match.md" >}})|Easy||||74.5%|
253+
|0942|DI String Match|[Go]({{< relref "/ChapterFour/0900~0999/0942.DI-String-Match.md" >}})|Easy||||74.6%|
254254
|0946|Validate Stack Sequences|[Go]({{< relref "/ChapterFour/0900~0999/0946.Validate-Stack-Sequences.md" >}})|Medium||||64.6%|
255255
|0952|Largest Component Size by Common Factor|[Go]({{< relref "/ChapterFour/0900~0999/0952.Largest-Component-Size-by-Common-Factor.md" >}})|Hard||||36.6%|
256256
|0953|Verifying an Alien Dictionary|[Go]({{< relref "/ChapterFour/0900~0999/0953.Verifying-an-Alien-Dictionary.md" >}})|Easy||||52.1%|

website/content/ChapterTwo/Backtracking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func updateMatrix_BFS(matrix [][]int) [][]int {
130130
|0526|Beautiful Arrangement|[Go]({{< relref "/ChapterFour/0500~0599/0526.Beautiful-Arrangement.md" >}})|Medium| O(n^2)| O(1)|❤️|62.5%|
131131
|0638|Shopping Offers|[Go]({{< relref "/ChapterFour/0600~0699/0638.Shopping-Offers.md" >}})|Medium||||53.9%|
132132
|0784|Letter Case Permutation|[Go]({{< relref "/ChapterFour/0700~0799/0784.Letter-Case-Permutation.md" >}})|Medium| O(n)| O(n)||69.5%|
133-
|0816|Ambiguous Coordinates|[Go]({{< relref "/ChapterFour/0800~0899/0816.Ambiguous-Coordinates.md" >}})|Medium||||55.7%|
133+
|0816|Ambiguous Coordinates|[Go]({{< relref "/ChapterFour/0800~0899/0816.Ambiguous-Coordinates.md" >}})|Medium||||55.6%|
134134
|0842|Split Array into Fibonacci Sequence|[Go]({{< relref "/ChapterFour/0800~0899/0842.Split-Array-into-Fibonacci-Sequence.md" >}})|Medium| O(n^2)| O(1)|❤️|37.2%|
135135
|0980|Unique Paths III|[Go]({{< relref "/ChapterFour/0900~0999/0980.Unique-Paths-III.md" >}})|Hard| O(n log n)| O(n)||77.3%|
136136
|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.7%|

website/content/ChapterTwo/Binary_Search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func peakIndexInMountainArray(A []int) int {
173173
|0668|Kth Smallest Number in Multiplication Table|[Go]({{< relref "/ChapterFour/0600~0699/0668.Kth-Smallest-Number-in-Multiplication-Table.md" >}})|Hard||||48.5%|
174174
|0704|Binary Search|[Go]({{< relref "/ChapterFour/0700~0799/0704.Binary-Search.md" >}})|Easy||||54.9%|
175175
|0710|Random Pick with Blacklist|[Go]({{< relref "/ChapterFour/0700~0799/0710.Random-Pick-with-Blacklist.md" >}})|Hard| O(n)| O(n) ||33.3%|
176-
|0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||51.0%|
176+
|0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||51.1%|
177177
|0719|Find K-th Smallest Pair Distance|[Go]({{< relref "/ChapterFour/0700~0799/0719.Find-K-th-Smallest-Pair-Distance.md" >}})|Hard||||33.2%|
178178
|0744|Find Smallest Letter Greater Than Target|[Go]({{< relref "/ChapterFour/0700~0799/0744.Find-Smallest-Letter-Greater-Than-Target.md" >}})|Easy||||45.8%|
179179
|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard||||57.8%|

website/content/ChapterTwo/Bit_Manipulation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ X & ~X = 0
7777
|0526|Beautiful Arrangement|[Go]({{< relref "/ChapterFour/0500~0599/0526.Beautiful-Arrangement.md" >}})|Medium||||62.5%|
7878
|0638|Shopping Offers|[Go]({{< relref "/ChapterFour/0600~0699/0638.Shopping-Offers.md" >}})|Medium||||53.9%|
7979
|0645|Set Mismatch|[Go]({{< relref "/ChapterFour/0600~0699/0645.Set-Mismatch.md" >}})|Easy||||40.9%|
80-
|0693|Binary Number with Alternating Bits|[Go]({{< relref "/ChapterFour/0600~0699/0693.Binary-Number-with-Alternating-Bits.md" >}})|Easy| O(n)| O(1)|❤️|60.4%|
80+
|0693|Binary Number with Alternating Bits|[Go]({{< relref "/ChapterFour/0600~0699/0693.Binary-Number-with-Alternating-Bits.md" >}})|Easy| O(n)| O(1)|❤️|60.3%|
8181
|0756|Pyramid Transition Matrix|[Go]({{< relref "/ChapterFour/0700~0799/0756.Pyramid-Transition-Matrix.md" >}})|Medium| O(n log n)| O(n)||56.0%|
8282
|0762|Prime Number of Set Bits in Binary Representation|[Go]({{< relref "/ChapterFour/0700~0799/0762.Prime-Number-of-Set-Bits-in-Binary-Representation.md" >}})|Easy| O(n)| O(1)||65.3%|
8383
|0784|Letter Case Permutation|[Go]({{< relref "/ChapterFour/0700~0799/0784.Letter-Case-Permutation.md" >}})|Medium| O(n)| O(1)||69.5%|

website/content/ChapterTwo/Breadth_First_Search.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ weight: 10
3232
|0399|Evaluate Division|[Go]({{< relref "/ChapterFour/0300~0399/0399.Evaluate-Division.md" >}})|Medium||||55.4%|
3333
|0404|Sum of Left Leaves|[Go]({{< relref "/ChapterFour/0400~0499/0404.Sum-of-Left-Leaves.md" >}})|Easy||||52.9%|
3434
|0417|Pacific Atlantic Water Flow|[Go]({{< relref "/ChapterFour/0400~0499/0417.Pacific-Atlantic-Water-Flow.md" >}})|Medium||||45.5%|
35+
|0429|N-ary Tree Level Order Traversal|[Go]({{< relref "/ChapterFour/0400~0499/0429.N-ary-Tree-Level-Order-Traversal.md" >}})|Medium||||67.9%|
3536
|0433|Minimum Genetic Mutation|[Go]({{< relref "/ChapterFour/0400~0499/0433.Minimum-Genetic-Mutation.md" >}})|Medium||||44.2%|
3637
|0463|Island Perimeter|[Go]({{< relref "/ChapterFour/0400~0499/0463.Island-Perimeter.md" >}})|Easy||||67.4%|
3738
|0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0500~0599/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||63.6%|
@@ -55,7 +56,7 @@ weight: 10
5556
|0756|Pyramid Transition Matrix|[Go]({{< relref "/ChapterFour/0700~0799/0756.Pyramid-Transition-Matrix.md" >}})|Medium||||56.0%|
5657
|0765|Couples Holding Hands|[Go]({{< relref "/ChapterFour/0700~0799/0765.Couples-Holding-Hands.md" >}})|Hard||||56.0%|
5758
|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard||||57.8%|
58-
|0783|Minimum Distance Between BST Nodes|[Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}})|Easy||||54.9%|
59+
|0783|Minimum Distance Between BST Nodes|[Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}})|Easy||||54.8%|
5960
|0785|Is Graph Bipartite?|[Go]({{< relref "/ChapterFour/0700~0799/0785.Is-Graph-Bipartite.md" >}})|Medium||||49.3%|
6061
|0802|Find Eventual Safe States|[Go]({{< relref "/ChapterFour/0800~0899/0802.Find-Eventual-Safe-States.md" >}})|Medium||||50.8%|
6162
|0815|Bus Routes|[Go]({{< relref "/ChapterFour/0800~0899/0815.Bus-Routes.md" >}})|Hard||||44.1%|
@@ -71,7 +72,7 @@ weight: 10
7172
|0993|Cousins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0993.Cousins-in-Binary-Tree.md" >}})|Easy| O(n)| O(1)||52.4%|
7273
|1020|Number of Enclaves|[Go]({{< relref "/ChapterFour/1000~1099/1020.Number-of-Enclaves.md" >}})|Medium||||60.2%|
7374
|1091|Shortest Path in Binary Matrix|[Go]({{< relref "/ChapterFour/1000~1099/1091.Shortest-Path-in-Binary-Matrix.md" >}})|Medium||||40.8%|
74-
|1123|Lowest Common Ancestor of Deepest Leaves|[Go]({{< relref "/ChapterFour/1100~1199/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}})|Medium||||68.7%|
75+
|1123|Lowest Common Ancestor of Deepest Leaves|[Go]({{< relref "/ChapterFour/1100~1199/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}})|Medium||||68.6%|
7576
|1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1200~1299/1202.Smallest-String-With-Swaps.md" >}})|Medium||||49.8%|
7677
|1203|Sort Items by Groups Respecting Dependencies|[Go]({{< relref "/ChapterFour/1200~1299/1203.Sort-Items-by-Groups-Respecting-Dependencies.md" >}})|Hard||||48.7%|
7778
|1254|Number of Closed Islands|[Go]({{< relref "/ChapterFour/1200~1299/1254.Number-of-Closed-Islands.md" >}})|Medium||||62.4%|

website/content/ChapterTwo/Depth_First_Search.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ weight: 9
7575
|0756|Pyramid Transition Matrix|[Go]({{< relref "/ChapterFour/0700~0799/0756.Pyramid-Transition-Matrix.md" >}})|Medium||||56.0%|
7676
|0765|Couples Holding Hands|[Go]({{< relref "/ChapterFour/0700~0799/0765.Couples-Holding-Hands.md" >}})|Hard||||56.0%|
7777
|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard||||57.8%|
78-
|0783|Minimum Distance Between BST Nodes|[Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}})|Easy||||54.9%|
78+
|0783|Minimum Distance Between BST Nodes|[Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}})|Easy||||54.8%|
7979
|0785|Is Graph Bipartite?|[Go]({{< relref "/ChapterFour/0700~0799/0785.Is-Graph-Bipartite.md" >}})|Medium||||49.3%|
8080
|0802|Find Eventual Safe States|[Go]({{< relref "/ChapterFour/0800~0899/0802.Find-Eventual-Safe-States.md" >}})|Medium||||50.8%|
8181
|0834|Sum of Distances in Tree|[Go]({{< relref "/ChapterFour/0800~0899/0834.Sum-of-Distances-in-Tree.md" >}})|Hard||||47.8%|
@@ -99,8 +99,8 @@ weight: 9
9999
|1026|Maximum Difference Between Node and Ancestor|[Go]({{< relref "/ChapterFour/1000~1099/1026.Maximum-Difference-Between-Node-and-Ancestor.md" >}})|Medium||||70.3%|
100100
|1028|Recover a Tree From Preorder Traversal|[Go]({{< relref "/ChapterFour/1000~1099/1028.Recover-a-Tree-From-Preorder-Traversal.md" >}})|Hard||||71.4%|
101101
|1038|Binary Search Tree to Greater Sum Tree|[Go]({{< relref "/ChapterFour/1000~1099/1038.Binary-Search-Tree-to-Greater-Sum-Tree.md" >}})|Medium||||83.4%|
102-
|1110|Delete Nodes And Return Forest|[Go]({{< relref "/ChapterFour/1100~1199/1110.Delete-Nodes-And-Return-Forest.md" >}})|Medium||||68.4%|
103-
|1123|Lowest Common Ancestor of Deepest Leaves|[Go]({{< relref "/ChapterFour/1100~1199/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}})|Medium||||68.7%|
102+
|1110|Delete Nodes And Return Forest|[Go]({{< relref "/ChapterFour/1100~1199/1110.Delete-Nodes-And-Return-Forest.md" >}})|Medium||||68.3%|
103+
|1123|Lowest Common Ancestor of Deepest Leaves|[Go]({{< relref "/ChapterFour/1100~1199/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}})|Medium||||68.6%|
104104
|1145|Binary Tree Coloring Game|[Go]({{< relref "/ChapterFour/1100~1199/1145.Binary-Tree-Coloring-Game.md" >}})|Medium||||51.1%|
105105
|1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1200~1299/1202.Smallest-String-With-Swaps.md" >}})|Medium||||49.8%|
106106
|1203|Sort Items by Groups Respecting Dependencies|[Go]({{< relref "/ChapterFour/1200~1299/1203.Sort-Items-by-Groups-Respecting-Dependencies.md" >}})|Hard||||48.7%|

website/content/ChapterTwo/Dynamic_Programming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ weight: 7
6868
|0638|Shopping Offers|[Go]({{< relref "/ChapterFour/0600~0699/0638.Shopping-Offers.md" >}})|Medium||||53.9%|
6969
|0647|Palindromic Substrings|[Go]({{< relref "/ChapterFour/0600~0699/0647.Palindromic-Substrings.md" >}})|Medium||||63.2%|
7070
|0714|Best Time to Buy and Sell Stock with Transaction Fee|[Go]({{< relref "/ChapterFour/0700~0799/0714.Best-Time-to-Buy-and-Sell-Stock-with-Transaction-Fee.md" >}})|Medium| O(n)| O(1)||59.0%|
71-
|0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||51.0%|
71+
|0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||51.1%|
7272
|0746|Min Cost Climbing Stairs|[Go]({{< relref "/ChapterFour/0700~0799/0746.Min-Cost-Climbing-Stairs.md" >}})|Easy| O(n)| O(1)||53.9%|
7373
|0823|Binary Trees With Factors|[Go]({{< relref "/ChapterFour/0800~0899/0823.Binary-Trees-With-Factors.md" >}})|Medium||||43.6%|
7474
|0828|Count Unique Characters of All Substrings of a Given String|[Go]({{< relref "/ChapterFour/0800~0899/0828.Count-Unique-Characters-of-All-Substrings-of-a-Given-String.md" >}})|Hard||||47.0%|

0 commit comments

Comments
 (0)