Skip to content

Commit 228bde3

Browse files
committed
Add solution 989
1 parent 952be29 commit 228bde3

27 files changed

+549
-289
lines changed

README.md

Lines changed: 216 additions & 216 deletions
Large diffs are not rendered by default.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package leetcode
2+
3+
func addToArrayForm(A []int, K int) []int {
4+
res := []int{}
5+
for i := len(A) - 1; i >= 0; i-- {
6+
sum := A[i] + K%10
7+
K /= 10
8+
if sum >= 10 {
9+
K++
10+
sum -= 10
11+
}
12+
res = append(res, sum)
13+
}
14+
for ; K > 0; K /= 10 {
15+
res = append(res, K%10)
16+
}
17+
reverse(res)
18+
return res
19+
}
20+
21+
func reverse(A []int) {
22+
for i, n := 0, len(A); i < n/2; i++ {
23+
A[i], A[n-1-i] = A[n-1-i], A[i]
24+
}
25+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
package leetcode
2+
3+
import (
4+
"fmt"
5+
"testing"
6+
)
7+
8+
type question989 struct {
9+
para989
10+
ans989
11+
}
12+
13+
// para 是参数
14+
// one 代表第一个参数
15+
type para989 struct {
16+
A []int
17+
K int
18+
}
19+
20+
// ans 是答案
21+
// one 代表第一个答案
22+
type ans989 struct {
23+
one []int
24+
}
25+
26+
func Test_Problem989(t *testing.T) {
27+
28+
qs := []question989{
29+
30+
{
31+
para989{[]int{1, 2, 0, 0}, 34},
32+
ans989{[]int{1, 2, 3, 4}},
33+
},
34+
35+
{
36+
para989{[]int{2, 7, 4}, 181},
37+
ans989{[]int{4, 5, 5}},
38+
},
39+
40+
{
41+
para989{[]int{2, 1, 5}, 806},
42+
ans989{[]int{1, 0, 2, 1}},
43+
},
44+
45+
{
46+
para989{[]int{9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, 1},
47+
ans989{[]int{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
48+
},
49+
}
50+
51+
fmt.Printf("------------------------Leetcode Problem 989------------------------\n")
52+
53+
for _, q := range qs {
54+
_, p := q.ans989, q.para989
55+
fmt.Printf("【input】:%v 【output】:%v\n", p, addToArrayForm(p.A, p.K))
56+
}
57+
fmt.Printf("\n\n\n")
58+
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# [989. Add to Array-Form of Integer](https://leetcode.com/problems/add-to-array-form-of-integer/)
2+
3+
## 题目
4+
5+
For a non-negative integer `X`, the *array-form of `X`* is an array of its digits in left to right order.  For example, if `X = 1231`, then the array form is `[1,2,3,1]`.
6+
7+
Given the array-form `A` of a non-negative integer `X`, return the array-form of the integer `X+K`.
8+
9+
**Example 1:**
10+
11+
```
12+
Input: A = [1,2,0,0], K = 34
13+
Output: [1,2,3,4]
14+
Explanation: 1200 + 34 = 1234
15+
```
16+
17+
**Example 2:**
18+
19+
```
20+
Input: A = [2,7,4], K = 181
21+
Output: [4,5,5]
22+
Explanation: 274 + 181 = 455
23+
```
24+
25+
**Example 3:**
26+
27+
```
28+
Input: A = [2,1,5], K = 806
29+
Output: [1,0,2,1]
30+
Explanation: 215 + 806 = 1021
31+
```
32+
33+
**Example 4:**
34+
35+
```
36+
Input: A = [9,9,9,9,9,9,9,9,9,9], K = 1
37+
Output: [1,0,0,0,0,0,0,0,0,0,0]
38+
Explanation: 9999999999 + 1 = 10000000000
39+
```
40+
41+
**Note:**
42+
43+
1. `1 <= A.length <= 10000`
44+
2. `0 <= A[i] <= 9`
45+
3. `0 <= K <= 10000`
46+
4. If `A.length > 1`, then `A[0] != 0`
47+
48+
## 题目大意
49+
50+
对于非负整数 X 而言,X 的数组形式是每位数字按从左到右的顺序形成的数组。例如,如果 X = 1231,那么其数组形式为 [1,2,3,1]。给定非负整数 X 的数组形式 A,返回整数 X+K 的数组形式。
51+
52+
## 解题思路
53+
54+
- 简单题,计算 2 个非负整数的和。累加过程中不断的进位,最终输出到数组中记得需要逆序,即数字的高位排在数组下标较小的位置。
55+
56+
## 代码
57+
58+
```go
59+
package leetcode
60+
61+
func addToArrayForm(A []int, K int) []int {
62+
res := []int{}
63+
for i := len(A) - 1; i >= 0; i-- {
64+
sum := A[i] + K%10
65+
K /= 10
66+
if sum >= 10 {
67+
K++
68+
sum -= 10
69+
}
70+
res = append(res, sum)
71+
}
72+
for ; K > 0; K /= 10 {
73+
res = append(res, K%10)
74+
}
75+
reverse(res)
76+
return res
77+
}
78+
79+
func reverse(A []int) {
80+
for i, n := 0, len(A); i < n/2; i++ {
81+
A[i], A[n-1-i] = A[n-1-i], A[i]
82+
}
83+
}
84+
```

website/content/ChapterFour/0986.Interval-List-Intersections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ func intervalIntersection(A []Interval, B []Interval) []Interval {
7676
----------------------------------------------
7777
<div style="display: flex;justify-content: space-between;align-items: center;">
7878
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0985.Sum-of-Even-Numbers-After-Queries/">⬅️上一页</a></p>
79-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0990.Satisfiability-of-Equality-Equations/">下一页➡️</a></p>
79+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0989.Add-to-Array-Form-of-Integer/">下一页➡️</a></p>
8080
</div>
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# [989. Add to Array-Form of Integer](https://leetcode.com/problems/add-to-array-form-of-integer/)
2+
3+
## 题目
4+
5+
For a non-negative integer `X`, the *array-form of `X`* is an array of its digits in left to right order.  For example, if `X = 1231`, then the array form is `[1,2,3,1]`.
6+
7+
Given the array-form `A` of a non-negative integer `X`, return the array-form of the integer `X+K`.
8+
9+
**Example 1:**
10+
11+
```
12+
Input: A = [1,2,0,0], K = 34
13+
Output: [1,2,3,4]
14+
Explanation: 1200 + 34 = 1234
15+
```
16+
17+
**Example 2:**
18+
19+
```
20+
Input: A = [2,7,4], K = 181
21+
Output: [4,5,5]
22+
Explanation: 274 + 181 = 455
23+
```
24+
25+
**Example 3:**
26+
27+
```
28+
Input: A = [2,1,5], K = 806
29+
Output: [1,0,2,1]
30+
Explanation: 215 + 806 = 1021
31+
```
32+
33+
**Example 4:**
34+
35+
```
36+
Input: A = [9,9,9,9,9,9,9,9,9,9], K = 1
37+
Output: [1,0,0,0,0,0,0,0,0,0,0]
38+
Explanation: 9999999999 + 1 = 10000000000
39+
```
40+
41+
**Note:**
42+
43+
1. `1 <= A.length <= 10000`
44+
2. `0 <= A[i] <= 9`
45+
3. `0 <= K <= 10000`
46+
4. If `A.length > 1`, then `A[0] != 0`
47+
48+
## 题目大意
49+
50+
对于非负整数 X 而言,X 的数组形式是每位数字按从左到右的顺序形成的数组。例如,如果 X = 1231,那么其数组形式为 [1,2,3,1]。给定非负整数 X 的数组形式 A,返回整数 X+K 的数组形式。
51+
52+
## 解题思路
53+
54+
- 简单题,计算 2 个非负整数的和。累加过程中不断的进位,最终输出到数组中记得需要逆序,即数字的高位排在数组下标较小的位置。
55+
56+
## 代码
57+
58+
```go
59+
package leetcode
60+
61+
func addToArrayForm(A []int, K int) []int {
62+
res := []int{}
63+
for i := len(A) - 1; i >= 0; i-- {
64+
sum := A[i] + K%10
65+
K /= 10
66+
if sum >= 10 {
67+
K++
68+
sum -= 10
69+
}
70+
res = append(res, sum)
71+
}
72+
for ; K > 0; K /= 10 {
73+
res = append(res, K%10)
74+
}
75+
reverse(res)
76+
return res
77+
}
78+
79+
func reverse(A []int) {
80+
for i, n := 0, len(A); i < n/2; i++ {
81+
A[i], A[n-1-i] = A[n-1-i], A[i]
82+
}
83+
}
84+
```
85+
86+
87+
----------------------------------------------
88+
<div style="display: flex;justify-content: space-between;align-items: center;">
89+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0986.Interval-List-Intersections/">⬅️上一页</a></p>
90+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0990.Satisfiability-of-Equality-Equations/">下一页➡️</a></p>
91+
</div>

website/content/ChapterFour/0990.Satisfiability-of-Equality-Equations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ func equationsPossible(equations []string) bool {
101101

102102
----------------------------------------------
103103
<div style="display: flex;justify-content: space-between;align-items: center;">
104-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0986.Interval-List-Intersections/">⬅️上一页</a></p>
104+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0989.Add-to-Array-Form-of-Integer/">⬅️上一页</a></p>
105105
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0992.Subarrays-with-K-Different-Integers/">下一页➡️</a></p>
106106
</div>

website/content/ChapterTwo/Array.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,33 +84,34 @@ type: docs
8484
|0717|1-bit and 2-bit Characters|[Go]({{< relref "/ChapterFour/0717.1-bit-and-2-bit-Characters.md" >}})|Easy||||47.5%|
8585
|0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||50.2%|
8686
|0719|Find K-th Smallest Pair Distance|[Go]({{< relref "/ChapterFour/0719.Find-K-th-Smallest-Pair-Distance.md" >}})|Hard||||32.5%|
87-
|0724|Find Pivot Index|[Go]({{< relref "/ChapterFour/0724.Find-Pivot-Index.md" >}})|Easy||||45.0%|
87+
|0724|Find Pivot Index|[Go]({{< relref "/ChapterFour/0724.Find-Pivot-Index.md" >}})|Easy||||45.1%|
8888
|0729|My Calendar I|[Go]({{< relref "/ChapterFour/0729.My-Calendar-I.md" >}})|Medium||||53.1%|
8989
|0746|Min Cost Climbing Stairs|[Go]({{< relref "/ChapterFour/0746.Min-Cost-Climbing-Stairs.md" >}})|Easy| O(n)| O(1)||50.9%|
9090
|0766|Toeplitz Matrix|[Go]({{< relref "/ChapterFour/0766.Toeplitz-Matrix.md" >}})|Easy| O(n)| O(1)||65.8%|
9191
|0830|Positions of Large Groups|[Go]({{< relref "/ChapterFour/0830.Positions-of-Large-Groups.md" >}})|Easy||||50.3%|
9292
|0832|Flipping an Image|[Go]({{< relref "/ChapterFour/0832.Flipping-an-Image.md" >}})|Easy||||78.0%|
9393
|0867|Transpose Matrix|[Go]({{< relref "/ChapterFour/0867.Transpose-Matrix.md" >}})|Easy| O(n)| O(1)||62.2%|
9494
|0888|Fair Candy Swap|[Go]({{< relref "/ChapterFour/0888.Fair-Candy-Swap.md" >}})|Easy||||58.9%|
95-
|0891|Sum of Subsequence Widths|[Go]({{< relref "/ChapterFour/0891.Sum-of-Subsequence-Widths.md" >}})|Hard| O(n log n)| O(1)||32.8%|
95+
|0891|Sum of Subsequence Widths|[Go]({{< relref "/ChapterFour/0891.Sum-of-Subsequence-Widths.md" >}})|Hard| O(n log n)| O(1)||32.9%|
9696
|0896|Monotonic Array|[Go]({{< relref "/ChapterFour/0896.Monotonic-Array.md" >}})|Easy||||58.0%|
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.4%|
9999
|0918|Maximum Sum Circular Subarray|[Go]({{< relref "/ChapterFour/0918.Maximum-Sum-Circular-Subarray.md" >}})|Medium||||34.1%|
100100
|0922|Sort Array By Parity II|[Go]({{< relref "/ChapterFour/0922.Sort-Array-By-Parity-II.md" >}})|Easy| O(n)| O(1)||70.3%|
101101
|0969|Pancake Sorting|[Go]({{< relref "/ChapterFour/0969.Pancake-Sorting.md" >}})|Medium| O(n)| O(1)|❤️|68.6%|
102102
|0977|Squares of a Sorted Array|[Go]({{< relref "/ChapterFour/0977.Squares-of-a-Sorted-Array.md" >}})|Easy| O(n)| O(1)||72.3%|
103-
|0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0978.Longest-Turbulent-Subarray.md" >}})|Medium||||46.5%|
103+
|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%|
105+
|0989|Add to Array-Form of Integer|[Go]({{< relref "/ChapterFour/0989.Add-to-Array-Form-of-Integer.md" >}})|Easy||||44.7%|
105106
|0999|Available Captures for Rook|[Go]({{< relref "/ChapterFour/0999.Available-Captures-for-Rook.md" >}})|Easy||||66.9%|
106-
|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1002.Find-Common-Characters.md" >}})|Easy||||68.1%|
107-
|1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||59.5%|
107+
|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1002.Find-Common-Characters.md" >}})|Easy||||68.2%|
108+
|1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||59.6%|
108109
|1018|Binary Prefix Divisible By 5|[Go]({{< relref "/ChapterFour/1018.Binary-Prefix-Divisible-By-5.md" >}})|Easy||||47.8%|
109110
|1040|Moving Stones Until Consecutive II|[Go]({{< relref "/ChapterFour/1040.Moving-Stones-Until-Consecutive-II.md" >}})|Medium||||53.9%|
110111
|1051|Height Checker|[Go]({{< relref "/ChapterFour/1051.Height-Checker.md" >}})|Easy||||72.0%|
111112
|1052|Grumpy Bookstore Owner|[Go]({{< relref "/ChapterFour/1052.Grumpy-Bookstore-Owner.md" >}})|Medium||||55.7%|
112113
|1074|Number of Submatrices That Sum to Target|[Go]({{< relref "/ChapterFour/1074.Number-of-Submatrices-That-Sum-to-Target.md" >}})|Hard||||61.5%|
113-
|1089|Duplicate Zeros|[Go]({{< relref "/ChapterFour/1089.Duplicate-Zeros.md" >}})|Easy||||52.1%|
114+
|1089|Duplicate Zeros|[Go]({{< relref "/ChapterFour/1089.Duplicate-Zeros.md" >}})|Easy||||52.0%|
114115
|1122|Relative Sort Array|[Go]({{< relref "/ChapterFour/1122.Relative-Sort-Array.md" >}})|Easy||||67.8%|
115116
|1128|Number of Equivalent Domino Pairs|[Go]({{< relref "/ChapterFour/1128.Number-of-Equivalent-Domino-Pairs.md" >}})|Easy||||46.6%|
116117
|1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||39.6%|
@@ -141,9 +142,9 @@ type: docs
141142
|1480|Running Sum of 1d Array|[Go]({{< relref "/ChapterFour/1480.Running-Sum-of-1d-Array.md" >}})|Easy||||89.5%|
142143
|1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.9%|
143144
|1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||55.2%|
144-
|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||61.5%|
145-
|1646|Get Maximum in Generated Array|[Go]({{< relref "/ChapterFour/1646.Get-Maximum-in-Generated-Array.md" >}})|Easy||||53.6%|
146-
|1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1652.Defuse-the-Bomb.md" >}})|Easy||||64.1%|
145+
|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||61.2%|
146+
|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%|
147148
|1656|Design an Ordered Stream|[Go]({{< relref "/ChapterFour/1656.Design-an-Ordered-Stream.md" >}})|Easy||||82.3%|
148149
|1672|Richest Customer Wealth|[Go]({{< relref "/ChapterFour/1672.Richest-Customer-Wealth.md" >}})|Easy||||88.4%|
149150
|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------|

website/content/ChapterTwo/Backtracking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func updateMatrix_BFS(matrix [][]int) [][]int {
114114
|0079|Word Search|[Go]({{< relref "/ChapterFour/0079.Word-Search.md" >}})|Medium| O(n^2)| O(n^2)|❤️|36.6%|
115115
|0089|Gray Code|[Go]({{< relref "/ChapterFour/0089.Gray-Code.md" >}})|Medium| O(n)| O(1)||50.1%|
116116
|0090|Subsets II|[Go]({{< relref "/ChapterFour/0090.Subsets-II.md" >}})|Medium| O(n^2)| O(n)|❤️|48.5%|
117-
|0093|Restore IP Addresses|[Go]({{< relref "/ChapterFour/0093.Restore-IP-Addresses.md" >}})|Medium| O(n)| O(n)|❤️|37.2%|
117+
|0093|Restore IP Addresses|[Go]({{< relref "/ChapterFour/0093.Restore-IP-Addresses.md" >}})|Medium| O(n)| O(n)|❤️|37.3%|
118118
|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.4%|
119119
|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0131.Palindrome-Partitioning.md" >}})|Medium| O(n)| O(n^2)|❤️|51.4%|
120120
|0211|Design Add and Search Words Data Structure|[Go]({{< relref "/ChapterFour/0211.Design-Add-and-Search-Words-Data-Structure.md" >}})|Medium| O(n)| O(n)|❤️|39.8%|
@@ -130,7 +130,7 @@ func updateMatrix_BFS(matrix [][]int) [][]int {
130130
|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.0%|
131131
|1079|Letter Tile Possibilities|[Go]({{< relref "/ChapterFour/1079.Letter-Tile-Possibilities.md" >}})|Medium| O(n^2)| O(1)|❤️|75.8%|
132132
|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||77.4%|
133-
|1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.4%|
133+
|1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.5%|
134134
|1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1659.Maximize-Grid-Happiness.md" >}})|Hard||||35.2%|
135135
|1681|Minimum Incompatibility|[Go]({{< relref "/ChapterFour/1681.Minimum-Incompatibility.md" >}})|Hard||||35.1%|
136136
|1688|Count of Matches in Tournament|[Go]({{< relref "/ChapterFour/1688.Count-of-Matches-in-Tournament.md" >}})|Easy||||83.0%|

website/content/ChapterTwo/Binary_Indexed_Tree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type: docs
1010
| No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance |
1111
|:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: |
1212
|0218|The Skyline Problem|[Go]({{< relref "/ChapterFour/0218.The-Skyline-Problem.md" >}})|Hard||||36.1%|
13-
|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0307.Range-Sum-Query---Mutable.md" >}})|Medium||||36.5%|
13+
|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0307.Range-Sum-Query---Mutable.md" >}})|Medium||||36.6%|
1414
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard||||42.6%|
1515
|0327|Count of Range Sum|[Go]({{< relref "/ChapterFour/0327.Count-of-Range-Sum.md" >}})|Hard||||35.9%|
1616
|0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0493.Reverse-Pairs.md" >}})|Hard||||26.6%|

website/content/ChapterTwo/Binary_Search.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func peakIndexInMountainArray(A []int) int {
177177
|0744|Find Smallest Letter Greater Than Target|[Go]({{< relref "/ChapterFour/0744.Find-Smallest-Letter-Greater-Than-Target.md" >}})|Easy||||45.6%|
178178
|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0778.Swim-in-Rising-Water.md" >}})|Hard||||54.4%|
179179
|0786|K-th Smallest Prime Fraction|[Go]({{< relref "/ChapterFour/0786.K-th-Smallest-Prime-Fraction.md" >}})|Hard||||41.9%|
180-
|0793|Preimage Size of Factorial Zeroes Function|[Go]({{< relref "/ChapterFour/0793.Preimage-Size-of-Factorial-Zeroes-Function.md" >}})|Hard||||40.7%|
180+
|0793|Preimage Size of Factorial Zeroes Function|[Go]({{< relref "/ChapterFour/0793.Preimage-Size-of-Factorial-Zeroes-Function.md" >}})|Hard||||40.6%|
181181
|0852|Peak Index in a Mountain Array|[Go]({{< relref "/ChapterFour/0852.Peak-Index-in-a-Mountain-Array.md" >}})|Easy||||71.8%|
182182
|0862|Shortest Subarray with Sum at Least K|[Go]({{< relref "/ChapterFour/0862.Shortest-Subarray-with-Sum-at-Least-K.md" >}})|Hard||||25.1%|
183183
|0875|Koko Eating Bananas|[Go]({{< relref "/ChapterFour/0875.Koko-Eating-Bananas.md" >}})|Medium||||53.4%|
@@ -186,7 +186,7 @@ func peakIndexInMountainArray(A []int) int {
186186
|0911|Online Election|[Go]({{< relref "/ChapterFour/0911.Online-Election.md" >}})|Medium||||51.2%|
187187
|0927|Three Equal Parts|[Go]({{< relref "/ChapterFour/0927.Three-Equal-Parts.md" >}})|Hard||||34.5%|
188188
|0981|Time Based Key-Value Store|[Go]({{< relref "/ChapterFour/0981.Time-Based-Key-Value-Store.md" >}})|Medium||||54.0%|
189-
|1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||59.5%|
189+
|1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||59.6%|
190190
|1111|Maximum Nesting Depth of Two Valid Parentheses Strings|[Go]({{< relref "/ChapterFour/1111.Maximum-Nesting-Depth-of-Two-Valid-Parentheses-Strings.md" >}})|Medium||||72.4%|
191191
|1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||39.6%|
192192
|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%|
@@ -195,7 +195,7 @@ func peakIndexInMountainArray(A []int) int {
195195
|1283|Find the Smallest Divisor Given a Threshold|[Go]({{< relref "/ChapterFour/1283.Find-the-Smallest-Divisor-Given-a-Threshold.md" >}})|Medium||||49.2%|
196196
|1300|Sum of Mutated Array Closest to Target|[Go]({{< relref "/ChapterFour/1300.Sum-of-Mutated-Array-Closest-to-Target.md" >}})|Medium||||43.3%|
197197
|1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||36.1%|
198-
|1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||33.4%|
198+
|1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||33.3%|
199199
|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------|
200200

201201

0 commit comments

Comments
 (0)