Skip to content

Commit 4c34ef0

Browse files
committed
Add solution 1329
1 parent a16766e commit 4c34ef0

25 files changed

+549
-351
lines changed

README.md

Lines changed: 264 additions & 256 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package leetcode
2+
3+
import (
4+
"sort"
5+
)
6+
7+
func diagonalSort(mat [][]int) [][]int {
8+
m, n, diagonalsMap := len(mat), len(mat[0]), make(map[int][]int)
9+
for i := 0; i < m; i++ {
10+
for j := 0; j < n; j++ {
11+
diagonalsMap[i-j] = append(diagonalsMap[i-j], mat[i][j])
12+
}
13+
}
14+
for _, v := range diagonalsMap {
15+
sort.Ints(v)
16+
}
17+
for i := 0; i < m; i++ {
18+
for j := 0; j < n; j++ {
19+
mat[i][j] = diagonalsMap[i-j][0]
20+
diagonalsMap[i-j] = diagonalsMap[i-j][1:]
21+
}
22+
}
23+
return mat
24+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package leetcode
2+
3+
import (
4+
"fmt"
5+
"testing"
6+
)
7+
8+
type question1329 struct {
9+
para1329
10+
ans1329
11+
}
12+
13+
// para 是参数
14+
// one 代表第一个参数
15+
type para1329 struct {
16+
mat [][]int
17+
}
18+
19+
// ans 是答案
20+
// one 代表第一个答案
21+
type ans1329 struct {
22+
one [][]int
23+
}
24+
25+
func Test_Problem1329(t *testing.T) {
26+
27+
qs := []question1329{
28+
29+
{
30+
para1329{[][]int{{3, 3, 1, 1}, {2, 2, 1, 2}, {1, 1, 1, 2}}},
31+
ans1329{[][]int{{1, 1, 1, 1}, {1, 2, 2, 2}, {1, 2, 3, 3}}},
32+
},
33+
}
34+
35+
fmt.Printf("------------------------Leetcode Problem 1329------------------------\n")
36+
37+
for _, q := range qs {
38+
_, p := q.ans1329, q.para1329
39+
fmt.Printf("【input】:%v 【output】:%v\n", p, diagonalSort(p.mat))
40+
}
41+
fmt.Printf("\n\n\n")
42+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# [1329. Sort the Matrix Diagonally](https://leetcode.com/problems/sort-the-matrix-diagonally/)
2+
3+
4+
## 题目
5+
6+
**matrix diagonal** is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and going in the bottom-right direction until reaching the matrix's end. For example, the **matrix diagonal** starting from `mat[2][0]`, where `mat` is a `6 x 3` matrix, includes cells `mat[2][0]``mat[3][1]`, and `mat[4][2]`.
7+
8+
Given an `m x n` matrix `mat` of integers, sort each **matrix diagonal** in ascending order and return *the resulting matrix*.
9+
10+
**Example 1:**
11+
12+
![https://assets.leetcode.com/uploads/2020/01/21/1482_example_1_2.png](https://assets.leetcode.com/uploads/2020/01/21/1482_example_1_2.png)
13+
14+
```
15+
Input: mat = [[3,3,1,1],[2,2,1,2],[1,1,1,2]]
16+
Output: [[1,1,1,1],[1,2,2,2],[1,2,3,3]]
17+
```
18+
19+
**Constraints:**
20+
21+
- `m == mat.length`
22+
- `n == mat[i].length`
23+
- `1 <= m, n <= 100`
24+
- `1 <= mat[i][j] <= 100`
25+
26+
## 题目大意
27+
28+
给你一个 m * n 的整数矩阵 mat ,请你将同一条对角线上的元素(从左上到右下)按升序排序后,返回排好序的矩阵。
29+
30+
## 解题思路
31+
32+
- 这道题思路很简单。按照对角线,把每条对角线的元素读取出来放在数组中。这里可以利用 map 保存这些数组。再将这些数组排序。最后按照对角线还原矩阵即可。
33+
34+
## 代码
35+
36+
```go
37+
package leetcode
38+
39+
func diagonalSort(mat [][]int) [][]int {
40+
m, n, diagonalsMap := len(mat), len(mat[0]), make(map[int][]int)
41+
for i := 0; i < m; i++ {
42+
for j := 0; j < n; j++ {
43+
diagonalsMap[i-j] = append(diagonalsMap[i-j], mat[i][j])
44+
}
45+
}
46+
for _, v := range diagonalsMap {
47+
sort.Ints(v)
48+
}
49+
for i := 0; i < m; i++ {
50+
for j := 0; j < n; j++ {
51+
mat[i][j] = diagonalsMap[i-j][0]
52+
diagonalsMap[i-j] = diagonalsMap[i-j][1:]
53+
}
54+
}
55+
return mat
56+
}
57+
```

website/content/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,5 @@ func makeConnected(n int, connections [][]int) int {
9393
----------------------------------------------
9494
<div style="display: flex;justify-content: space-between;align-items: center;">
9595
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers/">⬅️上一页</a></p>
96-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/1380.Lucky-Numbers-in-a-Matrix/">下一页➡️</a></p>
96+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/1329.Sort-the-Matrix-Diagonally/">下一页➡️</a></p>
9797
</div>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# [1329. Sort the Matrix Diagonally](https://leetcode.com/problems/sort-the-matrix-diagonally/)
2+
3+
4+
## 题目
5+
6+
**matrix diagonal** is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and going in the bottom-right direction until reaching the matrix's end. For example, the **matrix diagonal** starting from `mat[2][0]`, where `mat` is a `6 x 3` matrix, includes cells `mat[2][0]``mat[3][1]`, and `mat[4][2]`.
7+
8+
Given an `m x n` matrix `mat` of integers, sort each **matrix diagonal** in ascending order and return *the resulting matrix*.
9+
10+
**Example 1:**
11+
12+
![https://assets.leetcode.com/uploads/2020/01/21/1482_example_1_2.png](https://assets.leetcode.com/uploads/2020/01/21/1482_example_1_2.png)
13+
14+
```
15+
Input: mat = [[3,3,1,1],[2,2,1,2],[1,1,1,2]]
16+
Output: [[1,1,1,1],[1,2,2,2],[1,2,3,3]]
17+
```
18+
19+
**Constraints:**
20+
21+
- `m == mat.length`
22+
- `n == mat[i].length`
23+
- `1 <= m, n <= 100`
24+
- `1 <= mat[i][j] <= 100`
25+
26+
## 题目大意
27+
28+
给你一个 m * n 的整数矩阵 mat ,请你将同一条对角线上的元素(从左上到右下)按升序排序后,返回排好序的矩阵。
29+
30+
## 解题思路
31+
32+
- 这道题思路很简单。按照对角线,把每条对角线的元素读取出来放在数组中。这里可以利用 map 保存这些数组。再将这些数组排序。最后按照对角线还原矩阵即可。
33+
34+
## 代码
35+
36+
```go
37+
package leetcode
38+
39+
func diagonalSort(mat [][]int) [][]int {
40+
m, n, diagonalsMap := len(mat), len(mat[0]), make(map[int][]int)
41+
for i := 0; i < m; i++ {
42+
for j := 0; j < n; j++ {
43+
diagonalsMap[i-j] = append(diagonalsMap[i-j], mat[i][j])
44+
}
45+
}
46+
for _, v := range diagonalsMap {
47+
sort.Ints(v)
48+
}
49+
for i := 0; i < m; i++ {
50+
for j := 0; j < n; j++ {
51+
mat[i][j] = diagonalsMap[i-j][0]
52+
diagonalsMap[i-j] = diagonalsMap[i-j][1:]
53+
}
54+
}
55+
return mat
56+
}
57+
```
58+
59+
60+
----------------------------------------------
61+
<div style="display: flex;justify-content: space-between;align-items: center;">
62+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected/">⬅️上一页</a></p>
63+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/1380.Lucky-Numbers-in-a-Matrix/">下一页➡️</a></p>
64+
</div>

website/content/ChapterFour/1380.Lucky-Numbers-in-a-Matrix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ func luckyNumbers(matrix [][]int) []int {
8989

9090
----------------------------------------------
9191
<div style="display: flex;justify-content: space-between;align-items: center;">
92-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected/">⬅️上一页</a></p>
92+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/1329.Sort-the-Matrix-Diagonally/">⬅️上一页</a></p>
9393
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/1385.Find-the-Distance-Value-Between-Two-Arrays/">下一页➡️</a></p>
9494
</div>

website/content/ChapterTwo/Array.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type: docs
77

88
| No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance |
99
|:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: |
10-
|0001|Two Sum|[Go]({{< relref "/ChapterFour/0001.Two-Sum.md" >}})|Easy| O(n)| O(n)||46.2%|
10+
|0001|Two Sum|[Go]({{< relref "/ChapterFour/0001.Two-Sum.md" >}})|Easy| O(n)| O(n)||46.3%|
1111
|0004|Median of Two Sorted Arrays|[Go]({{< relref "/ChapterFour/0004.Median-of-Two-Sorted-Arrays.md" >}})|Hard||||30.8%|
1212
|0011|Container With Most Water|[Go]({{< relref "/ChapterFour/0011.Container-With-Most-Water.md" >}})|Medium| O(n)| O(1)||52.2%|
1313
|0015|3Sum|[Go]({{< relref "/ChapterFour/0015.3Sum.md" >}})|Medium| O(n^2)| O(n)|❤️|27.8%|
@@ -18,11 +18,11 @@ type: docs
1818
|0033|Search in Rotated Sorted Array|[Go]({{< relref "/ChapterFour/0033.Search-in-Rotated-Sorted-Array.md" >}})|Medium||||35.7%|
1919
|0034|Find First and Last Position of Element in Sorted Array|[Go]({{< relref "/ChapterFour/0034.Find-First-and-Last-Position-of-Element-in-Sorted-Array.md" >}})|Medium||||37.1%|
2020
|0035|Search Insert Position|[Go]({{< relref "/ChapterFour/0035.Search-Insert-Position.md" >}})|Easy||||42.8%|
21-
|0039|Combination Sum|[Go]({{< relref "/ChapterFour/0039.Combination-Sum.md" >}})|Medium| O(n log n)| O(n)||58.8%|
21+
|0039|Combination Sum|[Go]({{< relref "/ChapterFour/0039.Combination-Sum.md" >}})|Medium| O(n log n)| O(n)||58.9%|
2222
|0040|Combination Sum II|[Go]({{< relref "/ChapterFour/0040.Combination-Sum-II.md" >}})|Medium| O(n log n)| O(n)||49.9%|
2323
|0041|First Missing Positive|[Go]({{< relref "/ChapterFour/0041.First-Missing-Positive.md" >}})|Hard| O(n)| O(n)||33.5%|
2424
|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|50.8%|
25-
|0048|Rotate Image|[Go]({{< relref "/ChapterFour/0048.Rotate-Image.md" >}})|Medium| O(n)| O(1)||59.4%|
25+
|0048|Rotate Image|[Go]({{< relref "/ChapterFour/0048.Rotate-Image.md" >}})|Medium| O(n)| O(1)||59.5%|
2626
|0053|Maximum Subarray|[Go]({{< relref "/ChapterFour/0053.Maximum-Subarray.md" >}})|Easy| O(n)| O(n)||47.6%|
2727
|0054|Spiral Matrix|[Go]({{< relref "/ChapterFour/0054.Spiral-Matrix.md" >}})|Medium| O(n)| O(n^2)||35.6%|
2828
|0055|Jump Game|[Go]({{< relref "/ChapterFour/0055.Jump-Game.md" >}})|Medium||||35.1%|
@@ -43,8 +43,8 @@ type: docs
4343
|0088|Merge Sorted Array|[Go]({{< relref "/ChapterFour/0088.Merge-Sorted-Array.md" >}})|Easy| O(n)| O(1)|❤️|40.6%|
4444
|0090|Subsets II|[Go]({{< relref "/ChapterFour/0090.Subsets-II.md" >}})|Medium| O(n^2)| O(n)|❤️|48.6%|
4545
|0105|Construct Binary Tree from Preorder and Inorder Traversal|[Go]({{< relref "/ChapterFour/0105.Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal.md" >}})|Medium||||51.3%|
46-
|0106|Construct Binary Tree from Inorder and Postorder Traversal|[Go]({{< relref "/ChapterFour/0106.Construct-Binary-Tree-from-Inorder-and-Postorder-Traversal.md" >}})|Medium||||49.2%|
47-
|0118|Pascal's Triangle|[Go]({{< relref "/ChapterFour/0118.Pascals-Triangle.md" >}})|Easy||||54.4%|
46+
|0106|Construct Binary Tree from Inorder and Postorder Traversal|[Go]({{< relref "/ChapterFour/0106.Construct-Binary-Tree-from-Inorder-and-Postorder-Traversal.md" >}})|Medium||||49.3%|
47+
|0118|Pascal's Triangle|[Go]({{< relref "/ChapterFour/0118.Pascals-Triangle.md" >}})|Easy||||54.5%|
4848
|0120|Triangle|[Go]({{< relref "/ChapterFour/0120.Triangle.md" >}})|Medium| O(n^2)| O(n)||45.5%|
4949
|0121|Best Time to Buy and Sell Stock|[Go]({{< relref "/ChapterFour/0121.Best-Time-to-Buy-and-Sell-Stock.md" >}})|Easy| O(n)| O(1)||51.3%|
5050
|0122|Best Time to Buy and Sell Stock II|[Go]({{< relref "/ChapterFour/0122.Best-Time-to-Buy-and-Sell-Stock-II.md" >}})|Easy| O(n)| O(1)||58.3%|
@@ -61,15 +61,15 @@ type: docs
6161
|0216|Combination Sum III|[Go]({{< relref "/ChapterFour/0216.Combination-Sum-III.md" >}})|Medium| O(n)| O(1)|❤️|60.0%|
6262
|0217|Contains Duplicate|[Go]({{< relref "/ChapterFour/0217.Contains-Duplicate.md" >}})|Easy| O(n)| O(n)||56.5%|
6363
|0219|Contains Duplicate II|[Go]({{< relref "/ChapterFour/0219.Contains-Duplicate-II.md" >}})|Easy| O(n)| O(n)||38.5%|
64-
|0228|Summary Ranges|[Go]({{< relref "/ChapterFour/0228.Summary-Ranges.md" >}})|Easy||||42.1%|
64+
|0228|Summary Ranges|[Go]({{< relref "/ChapterFour/0228.Summary-Ranges.md" >}})|Easy||||42.2%|
6565
|0229|Majority Element II|[Go]({{< relref "/ChapterFour/0229.Majority-Element-II.md" >}})|Medium||||38.6%|
6666
|0268|Missing Number|[Go]({{< relref "/ChapterFour/0268.Missing-Number.md" >}})|Easy||||53.5%|
6767
|0283|Move Zeroes|[Go]({{< relref "/ChapterFour/0283.Move-Zeroes.md" >}})|Easy| O(n)| O(1)||58.5%|
6868
|0287|Find the Duplicate Number|[Go]({{< relref "/ChapterFour/0287.Find-the-Duplicate-Number.md" >}})|Medium| O(n)| O(1)|❤️|57.2%|
69-
|0414|Third Maximum Number|[Go]({{< relref "/ChapterFour/0414.Third-Maximum-Number.md" >}})|Easy||||30.7%|
69+
|0414|Third Maximum Number|[Go]({{< relref "/ChapterFour/0414.Third-Maximum-Number.md" >}})|Easy||||30.6%|
7070
|0448|Find All Numbers Disappeared in an Array|[Go]({{< relref "/ChapterFour/0448.Find-All-Numbers-Disappeared-in-an-Array.md" >}})|Easy||||56.1%|
7171
|0457|Circular Array Loop|[Go]({{< relref "/ChapterFour/0457.Circular-Array-Loop.md" >}})|Medium||||30.0%|
72-
|0485|Max Consecutive Ones|[Go]({{< relref "/ChapterFour/0485.Max-Consecutive-Ones.md" >}})|Easy||||53.2%|
72+
|0485|Max Consecutive Ones|[Go]({{< relref "/ChapterFour/0485.Max-Consecutive-Ones.md" >}})|Easy||||53.1%|
7373
|0509|Fibonacci Number|[Go]({{< relref "/ChapterFour/0509.Fibonacci-Number.md" >}})|Easy||||67.3%|
7474
|0532|K-diff Pairs in an Array|[Go]({{< relref "/ChapterFour/0532.K-diff-Pairs-in-an-Array.md" >}})|Medium| O(n)| O(n)||34.9%|
7575
|0561|Array Partition I|[Go]({{< relref "/ChapterFour/0561.Array-Partition-I.md" >}})|Easy||||73.0%|
@@ -97,9 +97,9 @@ type: docs
9797
|0907|Sum of Subarray Minimums|[Go]({{< relref "/ChapterFour/0907.Sum-of-Subarray-Minimums.md" >}})|Medium| O(n)| O(n)|❤️|33.2%|
9898
|0914|X of a Kind in a Deck of Cards|[Go]({{< relref "/ChapterFour/0914.X-of-a-Kind-in-a-Deck-of-Cards.md" >}})|Easy||||34.3%|
9999
|0918|Maximum Sum Circular Subarray|[Go]({{< relref "/ChapterFour/0918.Maximum-Sum-Circular-Subarray.md" >}})|Medium||||34.1%|
100-
|0922|Sort Array By Parity II|[Go]({{< relref "/ChapterFour/0922.Sort-Array-By-Parity-II.md" >}})|Easy| O(n)| O(1)||70.3%|
100+
|0922|Sort Array By Parity II|[Go]({{< relref "/ChapterFour/0922.Sort-Array-By-Parity-II.md" >}})|Easy| O(n)| O(1)||70.4%|
101101
|0969|Pancake Sorting|[Go]({{< relref "/ChapterFour/0969.Pancake-Sorting.md" >}})|Medium| O(n)| O(1)|❤️|68.6%|
102-
|0977|Squares of a Sorted Array|[Go]({{< relref "/ChapterFour/0977.Squares-of-a-Sorted-Array.md" >}})|Easy| O(n)| O(1)||72.3%|
102+
|0977|Squares of a Sorted Array|[Go]({{< relref "/ChapterFour/0977.Squares-of-a-Sorted-Array.md" >}})|Easy| O(n)| O(1)||72.2%|
103103
|0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0978.Longest-Turbulent-Subarray.md" >}})|Medium||||46.6%|
104104
|0985|Sum of Even Numbers After Queries|[Go]({{< relref "/ChapterFour/0985.Sum-of-Even-Numbers-After-Queries.md" >}})|Easy||||60.7%|
105105
|0989|Add to Array-Form of Integer|[Go]({{< relref "/ChapterFour/0989.Add-to-Array-Form-of-Integer.md" >}})|Easy||||44.7%|
@@ -115,36 +115,37 @@ type: docs
115115
|1122|Relative Sort Array|[Go]({{< relref "/ChapterFour/1122.Relative-Sort-Array.md" >}})|Easy||||67.8%|
116116
|1128|Number of Equivalent Domino Pairs|[Go]({{< relref "/ChapterFour/1128.Number-of-Equivalent-Domino-Pairs.md" >}})|Easy||||46.6%|
117117
|1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||39.6%|
118-
|1160|Find Words That Can Be Formed by Characters|[Go]({{< relref "/ChapterFour/1160.Find-Words-That-Can-Be-Formed-by-Characters.md" >}})|Easy||||67.5%|
118+
|1160|Find Words That Can Be Formed by Characters|[Go]({{< relref "/ChapterFour/1160.Find-Words-That-Can-Be-Formed-by-Characters.md" >}})|Easy||||67.6%|
119119
|1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||59.5%|
120120
|1184|Distance Between Bus Stops|[Go]({{< relref "/ChapterFour/1184.Distance-Between-Bus-Stops.md" >}})|Easy||||54.1%|
121-
|1185|Day of the Week|[Go]({{< relref "/ChapterFour/1185.Day-of-the-Week.md" >}})|Easy||||61.9%|
121+
|1185|Day of the Week|[Go]({{< relref "/ChapterFour/1185.Day-of-the-Week.md" >}})|Easy||||61.8%|
122122
|1200|Minimum Absolute Difference|[Go]({{< relref "/ChapterFour/1200.Minimum-Absolute-Difference.md" >}})|Easy||||66.8%|
123123
|1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1202.Smallest-String-With-Swaps.md" >}})|Medium||||48.5%|
124124
|1208|Get Equal Substrings Within Budget|[Go]({{< relref "/ChapterFour/1208.Get-Equal-Substrings-Within-Budget.md" >}})|Medium||||43.7%|
125125
|1217|Minimum Cost to Move Chips to The Same Position|[Go]({{< relref "/ChapterFour/1217.Minimum-Cost-to-Move-Chips-to-The-Same-Position.md" >}})|Easy||||71.2%|
126126
|1232|Check If It Is a Straight Line|[Go]({{< relref "/ChapterFour/1232.Check-If-It-Is-a-Straight-Line.md" >}})|Easy||||43.8%|
127127
|1252|Cells with Odd Values in a Matrix|[Go]({{< relref "/ChapterFour/1252.Cells-with-Odd-Values-in-a-Matrix.md" >}})|Easy||||78.8%|
128128
|1260|Shift 2D Grid|[Go]({{< relref "/ChapterFour/1260.Shift-2D-Grid.md" >}})|Easy||||61.8%|
129-
|1266|Minimum Time Visiting All Points|[Go]({{< relref "/ChapterFour/1266.Minimum-Time-Visiting-All-Points.md" >}})|Easy||||79.4%|
129+
|1266|Minimum Time Visiting All Points|[Go]({{< relref "/ChapterFour/1266.Minimum-Time-Visiting-All-Points.md" >}})|Easy||||79.5%|
130130
|1275|Find Winner on a Tic Tac Toe Game|[Go]({{< relref "/ChapterFour/1275.Find-Winner-on-a-Tic-Tac-Toe-Game.md" >}})|Easy||||53.0%|
131131
|1287|Element Appearing More Than 25% In Sorted Array|[Go]({{< relref "/ChapterFour/1287.Element-Appearing-More-Than-25-In-Sorted-Array.md" >}})|Easy||||60.2%|
132132
|1295|Find Numbers with Even Number of Digits|[Go]({{< relref "/ChapterFour/1295.Find-Numbers-with-Even-Number-of-Digits.md" >}})|Easy||||79.3%|
133-
|1299|Replace Elements with Greatest Element on Right Side|[Go]({{< relref "/ChapterFour/1299.Replace-Elements-with-Greatest-Element-on-Right-Side.md" >}})|Easy||||74.3%|
133+
|1299|Replace Elements with Greatest Element on Right Side|[Go]({{< relref "/ChapterFour/1299.Replace-Elements-with-Greatest-Element-on-Right-Side.md" >}})|Easy||||74.4%|
134134
|1300|Sum of Mutated Array Closest to Target|[Go]({{< relref "/ChapterFour/1300.Sum-of-Mutated-Array-Closest-to-Target.md" >}})|Medium||||43.2%|
135135
|1304|Find N Unique Integers Sum up to Zero|[Go]({{< relref "/ChapterFour/1304.Find-N-Unique-Integers-Sum-up-to-Zero.md" >}})|Easy||||76.8%|
136136
|1313|Decompress Run-Length Encoded List|[Go]({{< relref "/ChapterFour/1313.Decompress-Run-Length-Encoded-List.md" >}})|Easy||||85.4%|
137+
|1329|Sort the Matrix Diagonally|[Go]({{< relref "/ChapterFour/1329.Sort-the-Matrix-Diagonally.md" >}})|Medium||||81.7%|
137138
|1380|Lucky Numbers in a Matrix|[Go]({{< relref "/ChapterFour/1380.Lucky-Numbers-in-a-Matrix.md" >}})|Easy||||70.8%|
138139
|1385|Find the Distance Value Between Two Arrays|[Go]({{< relref "/ChapterFour/1385.Find-the-Distance-Value-Between-Two-Arrays.md" >}})|Easy||||66.4%|
139140
|1389|Create Target Array in the Given Order|[Go]({{< relref "/ChapterFour/1389.Create-Target-Array-in-the-Given-Order.md" >}})|Easy||||84.8%|
140141
|1464|Maximum Product of Two Elements in an Array|[Go]({{< relref "/ChapterFour/1464.Maximum-Product-of-Two-Elements-in-an-Array.md" >}})|Easy||||77.1%|
141-
|1470|Shuffle the Array|[Go]({{< relref "/ChapterFour/1470.Shuffle-the-Array.md" >}})|Easy||||88.5%|
142+
|1470|Shuffle the Array|[Go]({{< relref "/ChapterFour/1470.Shuffle-the-Array.md" >}})|Easy||||88.4%|
142143
|1480|Running Sum of 1d Array|[Go]({{< relref "/ChapterFour/1480.Running-Sum-of-1d-Array.md" >}})|Easy||||89.5%|
143-
|1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.9%|
144+
|1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.8%|
144145
|1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||55.2%|
145-
|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||60.9%|
146+
|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||60.8%|
146147
|1646|Get Maximum in Generated Array|[Go]({{< relref "/ChapterFour/1646.Get-Maximum-in-Generated-Array.md" >}})|Easy||||53.5%|
147-
|1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1652.Defuse-the-Bomb.md" >}})|Easy||||63.9%|
148+
|1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1652.Defuse-the-Bomb.md" >}})|Easy||||63.8%|
148149
|1656|Design an Ordered Stream|[Go]({{< relref "/ChapterFour/1656.Design-an-Ordered-Stream.md" >}})|Easy||||82.1%|
149150
|1672|Richest Customer Wealth|[Go]({{< relref "/ChapterFour/1672.Richest-Customer-Wealth.md" >}})|Easy||||88.4%|
150151
|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------|

0 commit comments

Comments
 (0)