Skip to content

Commit 127b852

Browse files
committed
Update solution 0234
1 parent cfb67ac commit 127b852

File tree

11 files changed

+109
-36
lines changed

11 files changed

+109
-36
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@
399399
|0258|Add Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0258.Add-Digits)|59.1%|Easy||
400400
|0259|3Sum Smaller||49.5%|Medium||
401401
|0260|Single Number III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0260.Single-Number-III)|65.6%|Medium||
402-
|0261|Graph Valid Tree||43.7%|Medium||
402+
|0261|Graph Valid Tree||43.8%|Medium||
403403
|0262|Trips and Users||36.3%|Hard||
404404
|0263|Ugly Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0263.Ugly-Number)|41.7%|Easy||
405405
|0264|Ugly Number II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0264.Ugly-Number-II)|43.3%|Medium||
@@ -453,7 +453,7 @@
453453
|0312|Burst Balloons||54.2%|Hard||
454454
|0313|Super Ugly Number||46.8%|Medium||
455455
|0314|Binary Tree Vertical Order Traversal||47.8%|Medium||
456-
|0315|Count of Smaller Numbers After Self|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0315.Count-of-Smaller-Numbers-After-Self)|42.3%|Hard||
456+
|0315|Count of Smaller Numbers After Self|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0315.Count-of-Smaller-Numbers-After-Self)|42.2%|Hard||
457457
|0316|Remove Duplicate Letters||39.8%|Medium||
458458
|0317|Shortest Distance from All Buildings||43.4%|Hard||
459459
|0318|Maximum Product of Word Lengths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0318.Maximum-Product-of-Word-Lengths)|55.4%|Medium||
@@ -497,7 +497,7 @@
497497
|0356|Line Reflection||33.4%|Medium||
498498
|0357|Count Numbers with Unique Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0357.Count-Numbers-with-Unique-Digits)|49.3%|Medium||
499499
|0358|Rearrange String k Distance Apart||36.0%|Hard||
500-
|0359|Logger Rate Limiter||73.1%|Easy||
500+
|0359|Logger Rate Limiter||73.2%|Easy||
501501
|0360|Sort Transformed Array||50.5%|Medium||
502502
|0361|Bomb Enemy||47.6%|Medium||
503503
|0362|Design Hit Counter||66.0%|Medium||
@@ -584,7 +584,7 @@
584584
|0443|String Compression||45.0%|Medium||
585585
|0444|Sequence Reconstruction||23.8%|Medium||
586586
|0445|Add Two Numbers II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0445.Add-Two-Numbers-II)|57.0%|Medium||
587-
|0446|Arithmetic Slices II - Subsequence||34.0%|Hard||
587+
|0446|Arithmetic Slices II - Subsequence||34.1%|Hard||
588588
|0447|Number of Boomerangs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0447.Number-of-Boomerangs)|52.7%|Medium||
589589
|0448|Find All Numbers Disappeared in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0448.Find-All-Numbers-Disappeared-in-an-Array)|56.6%|Easy||
590590
|0449|Serialize and Deserialize BST||54.7%|Medium||
@@ -1161,7 +1161,7 @@
11611161
|1020|Number of Enclaves|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1020.Number-of-Enclaves)|59.8%|Medium||
11621162
|1021|Remove Outermost Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1021.Remove-Outermost-Parentheses)|79.3%|Easy||
11631163
|1022|Sum of Root To Leaf Binary Numbers||71.9%|Easy||
1164-
|1023|Camelcase Matching||57.8%|Medium||
1164+
|1023|Camelcase Matching||57.9%|Medium||
11651165
|1024|Video Stitching||49.0%|Medium||
11661166
|1025|Divisor Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1025.Divisor-Game)|66.2%|Easy||
11671167
|1026|Maximum Difference Between Node and Ancestor|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1026.Maximum-Difference-Between-Node-and-Ancestor)|70.2%|Medium||
@@ -1494,7 +1494,7 @@
14941494
|1354|Construct Target Array With Multiple Sums||31.4%|Hard||
14951495
|1355|Activity Participants||74.7%|Medium||
14961496
|1356|Sort Integers by The Number of 1 Bits||70.6%|Easy||
1497-
|1357|Apply Discount Every n Orders||67.3%|Medium||
1497+
|1357|Apply Discount Every n Orders||67.2%|Medium||
14981498
|1358|Number of Substrings Containing All Three Characters||61.0%|Medium||
14991499
|1359|Count All Valid Pickup and Delivery Options||55.7%|Hard||
15001500
|1360|Number of Days Between Two Dates||46.5%|Easy||
@@ -1575,7 +1575,7 @@
15751575
|1435|Create a Session Bar Chart||78.6%|Easy||
15761576
|1436|Destination City||77.2%|Easy||
15771577
|1437|Check If All 1's Are at Least Length K Places Away|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1437.Check-If-All-1s-Are-at-Least-Length-K-Places-Away)|61.0%|Easy||
1578-
|1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit)|44.7%|Medium||
1578+
|1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit)|44.8%|Medium||
15791579
|1439|Find the Kth Smallest Sum of a Matrix With Sorted Rows|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1439.Find-the-Kth-Smallest-Sum-of-a-Matrix-With-Sorted-Rows)|61.2%|Hard||
15801580
|1440|Evaluate Boolean Expression||75.1%|Medium||
15811581
|1441|Build an Array With Stack Operations||70.4%|Easy||
@@ -1706,7 +1706,7 @@
17061706
|1566|Detect Pattern of Length M Repeated K or More Times||43.0%|Easy||
17071707
|1567|Maximum Length of Subarray With Positive Product||37.6%|Medium||
17081708
|1568|Minimum Number of Days to Disconnect Island||50.1%|Hard||
1709-
|1569|Number of Ways to Reorder Array to Get Same BST||50.0%|Hard||
1709+
|1569|Number of Ways to Reorder Array to Get Same BST||50.1%|Hard||
17101710
|1570|Dot Product of Two Sparse Vectors||91.1%|Medium||
17111711
|1571|Warehouse Manager||89.6%|Easy||
17121712
|1572|Matrix Diagonal Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1572.Matrix-Diagonal-Sum)|78.0%|Easy||
@@ -1721,7 +1721,7 @@
17211721
|1581|Customer Who Visited but Did Not Make Any Transactions||89.5%|Easy||
17221722
|1582|Special Positions in a Binary Matrix||64.2%|Easy||
17231723
|1583|Count Unhappy Friends||55.2%|Medium||
1724-
|1584|Min Cost to Connect All Points||55.3%|Medium||
1724+
|1584|Min Cost to Connect All Points||55.4%|Medium||
17251725
|1585|Check If String Is Transformable With Substring Sort Operations||48.5%|Hard||
17261726
|1586|Binary Search Tree Iterator II||66.7%|Medium||
17271727
|1587|Bank Account Summary II||89.9%|Easy||
@@ -1925,7 +1925,7 @@
19251925
|1785|Minimum Elements to Add to Form a Given Sum||40.0%|Medium||
19261926
|1786|Number of Restricted Paths From First to Last Node||36.5%|Medium||
19271927
|1787|Make the XOR of All Segments Equal to Zero||37.3%|Hard||
1928-
|1788|Maximize the Beauty of the Garden||67.1%|Hard||
1928+
|1788|Maximize the Beauty of the Garden||67.2%|Hard||
19291929
|1789|Primary Department for Each Employee||79.5%|Easy||
19301930
|1790|Check if One String Swap Can Make Strings Equal||44.4%|Easy||
19311931
|1791|Find Center of Star Graph||84.3%|Easy||
@@ -2019,10 +2019,10 @@
20192019
|1879|Minimum XOR Sum of Two Arrays||35.8%|Hard||
20202020
|1880|Check if Word Equals Summation of Two Words||71.8%|Easy||
20212021
|1881|Maximum Value after Insertion||33.7%|Medium||
2022-
|1882|Process Tasks Using Servers||30.5%|Medium||
2022+
|1882|Process Tasks Using Servers||30.6%|Medium||
20232023
|1883|Minimum Skips to Arrive at Meeting On Time||38.1%|Hard||
20242024
|1884|Egg Drop With 2 Eggs and N Floors||69.8%|Medium||
2025-
|1885|Count Pairs in Two Arrays||54.8%|Medium||
2025+
|1885|Count Pairs in Two Arrays||54.7%|Medium||
20262026
|1886|Determine Whether Matrix Can Be Obtained By Rotation||53.8%|Easy||
20272027
|1887|Reduction Operations to Make the Array Elements Equal||59.7%|Medium||
20282028
|1888|Minimum Number of Flips to Make the Binary String Alternating||33.8%|Medium||
@@ -2041,10 +2041,10 @@
20412041
|1901|Find a Peak Element II||64.4%|Medium||
20422042
|1902|Depth of BST Given Insertion Order||51.7%|Medium||
20432043
|1903|Largest Odd Number in String||58.1%|Easy||
2044-
|1904|The Number of Full Rounds You Have Played||52.9%|Medium||
2045-
|1905|Count Sub Islands||59.8%|Medium||
2044+
|1904|The Number of Full Rounds You Have Played||52.8%|Medium||
2045+
|1905|Count Sub Islands||59.7%|Medium||
20462046
|1906|Minimum Absolute Difference Queries||41.4%|Medium||
2047-
|1907|Count Salary Categories||62.4%|Medium||
2047+
|1907|Count Salary Categories||62.5%|Medium||
20482048
|1908|Game of Nim||64.1%|Medium||
20492049
|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|
20502050

leetcode/0234.Palindrome-Linked-List/234. Palindrome Linked List.go

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,75 @@ type ListNode = structures.ListNode
1515
* }
1616
*/
1717

18-
func isPalindrome234(head *ListNode) bool {
18+
// 解法一
19+
func isPalindrome(head *ListNode) bool {
1920
slice := []int{}
20-
2121
for head != nil {
2222
slice = append(slice, head.Val)
2323
head = head.Next
2424
}
25-
2625
for i, j := 0, len(slice)-1; i < j; {
2726
if slice[i] != slice[j] {
2827
return false
2928
}
30-
3129
i++
3230
j--
3331
}
34-
3532
return true
3633
}
34+
35+
// 解法二
36+
// 此题和 143 题 Reorder List 思路基本一致
37+
func isPalindrome1(head *ListNode) bool {
38+
if head == nil || head.Next == nil {
39+
return true
40+
}
41+
res := true
42+
// 寻找中间结点
43+
p1 := head
44+
p2 := head
45+
for p2.Next != nil && p2.Next.Next != nil {
46+
p1 = p1.Next
47+
p2 = p2.Next.Next
48+
}
49+
// 反转链表后半部分 1->2->3->4->5->6 to 1->2->3->6->5->4
50+
preMiddle := p1
51+
preCurrent := p1.Next
52+
for preCurrent.Next != nil {
53+
current := preCurrent.Next
54+
preCurrent.Next = current.Next
55+
current.Next = preMiddle.Next
56+
preMiddle.Next = current
57+
}
58+
// 扫描表,判断是否是回文
59+
p1 = head
60+
p2 = preMiddle.Next
61+
// fmt.Printf("p1 = %v p2 = %v preMiddle = %v head = %v\n", p1.Val, p2.Val, preMiddle.Val, L2ss(head))
62+
for p1 != preMiddle {
63+
// fmt.Printf("*****p1 = %v p2 = %v preMiddle = %v head = %v\n", p1, p2, preMiddle, L2ss(head))
64+
if p1.Val == p2.Val {
65+
p1 = p1.Next
66+
p2 = p2.Next
67+
// fmt.Printf("-------p1 = %v p2 = %v preMiddle = %v head = %v\n", p1, p2, preMiddle, L2ss(head))
68+
} else {
69+
res = false
70+
break
71+
}
72+
}
73+
if p1 == preMiddle {
74+
if p2 != nil && p1.Val != p2.Val {
75+
return false
76+
}
77+
}
78+
return res
79+
}
80+
81+
// L2ss define
82+
func L2ss(head *ListNode) []int {
83+
res := []int{}
84+
for head != nil {
85+
res = append(res, head.Val)
86+
head = head.Next
87+
}
88+
return res
89+
}

leetcode/0234.Palindrome-Linked-List/234. Palindrome Linked List_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func Test_Problem234(t *testing.T) {
8383

8484
for _, q := range qs {
8585
_, p := q.ans234, q.para234
86-
fmt.Printf("【input】:%v 【output】:%v\n", p, isPalindrome234(structures.Ints2List(p.one)))
86+
fmt.Printf("【input】:%v 【output】:%v\n", p, isPalindrome(structures.Ints2List(p.one)))
8787
}
8888
fmt.Printf("\n\n\n")
8989
}

website/content/ChapterFour/0200~0299/0234.Palindrome-Linked-List.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ Could you do it in O(n) time and O(1) space?
4040

4141
package leetcode
4242

43+
import (
44+
"github.com/halfrost/LeetCode-Go/structures"
45+
)
46+
47+
// ListNode define
48+
type ListNode = structures.ListNode
49+
4350
/**
4451
* Definition for singly-linked list.
4552
* type ListNode struct {
@@ -48,8 +55,26 @@ package leetcode
4855
* }
4956
*/
5057

58+
// 解法一
59+
func isPalindrome(head *ListNode) bool {
60+
slice := []int{}
61+
for head != nil {
62+
slice = append(slice, head.Val)
63+
head = head.Next
64+
}
65+
for i, j := 0, len(slice)-1; i < j; {
66+
if slice[i] != slice[j] {
67+
return false
68+
}
69+
i++
70+
j--
71+
}
72+
return true
73+
}
74+
75+
// 解法二
5176
// 此题和 143 题 Reorder List 思路基本一致
52-
func isPalindrome234(head *ListNode) bool {
77+
func isPalindrome1(head *ListNode) bool {
5378
if head == nil || head.Next == nil {
5479
return true
5580
}
@@ -61,7 +86,6 @@ func isPalindrome234(head *ListNode) bool {
6186
p1 = p1.Next
6287
p2 = p2.Next.Next
6388
}
64-
6589
// 反转链表后半部分 1->2->3->4->5->6 to 1->2->3->6->5->4
6690
preMiddle := p1
6791
preCurrent := p1.Next
@@ -71,7 +95,6 @@ func isPalindrome234(head *ListNode) bool {
7195
current.Next = preMiddle.Next
7296
preMiddle.Next = current
7397
}
74-
7598
// 扫描表,判断是否是回文
7699
p1 = head
77100
p2 = preMiddle.Next
@@ -92,19 +115,16 @@ func isPalindrome234(head *ListNode) bool {
92115
return false
93116
}
94117
}
95-
96118
return res
97119
}
98120

99121
// L2ss define
100122
func L2ss(head *ListNode) []int {
101123
res := []int{}
102-
103124
for head != nil {
104125
res = append(res, head.Val)
105126
head = head.Next
106127
}
107-
108128
return res
109129
}
110130

website/content/ChapterTwo/Array.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ weight: 1
1515
|0016|3Sum Closest|[Go]({{< relref "/ChapterFour/0001~0099/0016.3Sum-Closest.md" >}})|Medium| O(n^2)| O(1)|❤️|46.4%|
1616
|0018|4Sum|[Go]({{< relref "/ChapterFour/0001~0099/0018.4Sum.md" >}})|Medium| O(n^3)| O(n^2)|❤️|35.7%|
1717
|0026|Remove Duplicates from Sorted Array|[Go]({{< relref "/ChapterFour/0001~0099/0026.Remove-Duplicates-from-Sorted-Array.md" >}})|Easy| O(n)| O(1)||47.2%|
18-
|0027|Remove Element|[Go]({{< relref "/ChapterFour/0001~0099/0027.Remove-Element.md" >}})|Easy| O(n)| O(1)||49.9%|
18+
|0027|Remove Element|[Go]({{< relref "/ChapterFour/0001~0099/0027.Remove-Element.md" >}})|Easy| O(n)| O(1)||49.8%|
1919
|0031|Next Permutation|[Go]({{< relref "/ChapterFour/0001~0099/0031.Next-Permutation.md" >}})|Medium||||34.2%|
2020
|0033|Search in Rotated Sorted Array|[Go]({{< relref "/ChapterFour/0001~0099/0033.Search-in-Rotated-Sorted-Array.md" >}})|Medium||||36.5%|
2121
|0034|Find First and Last Position of Element in Sorted Array|[Go]({{< relref "/ChapterFour/0001~0099/0034.Find-First-and-Last-Position-of-Element-in-Sorted-Array.md" >}})|Medium||||38.1%|
@@ -101,7 +101,7 @@ weight: 1
101101
|0304|Range Sum Query 2D - Immutable|[Go]({{< relref "/ChapterFour/0300~0399/0304.Range-Sum-Query-2D-Immutable.md" >}})|Medium||||43.9%|
102102
|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0300~0399/0307.Range-Sum-Query-Mutable.md" >}})|Medium||||37.7%|
103103
|0309|Best Time to Buy and Sell Stock with Cooldown|[Go]({{< relref "/ChapterFour/0300~0399/0309.Best-Time-to-Buy-and-Sell-Stock-with-Cooldown.md" >}})|Medium||||48.9%|
104-
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard||||42.3%|
104+
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard||||42.2%|
105105
|0318|Maximum Product of Word Lengths|[Go]({{< relref "/ChapterFour/0300~0399/0318.Maximum-Product-of-Word-Lengths.md" >}})|Medium||||55.4%|
106106
|0322|Coin Change|[Go]({{< relref "/ChapterFour/0300~0399/0322.Coin-Change.md" >}})|Medium||||38.2%|
107107
|0324|Wiggle Sort II|[Go]({{< relref "/ChapterFour/0300~0399/0324.Wiggle-Sort-II.md" >}})|Medium||||31.1%|

website/content/ChapterTwo/Binary_Indexed_Tree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ weight: 19
1212
|:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: |
1313
|0218|The Skyline Problem|[Go]({{< relref "/ChapterFour/0200~0299/0218.The-Skyline-Problem.md" >}})|Hard||||37.1%|
1414
|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0300~0399/0307.Range-Sum-Query-Mutable.md" >}})|Medium||||37.7%|
15-
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard||||42.3%|
15+
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard||||42.2%|
1616
|0327|Count of Range Sum|[Go]({{< relref "/ChapterFour/0300~0399/0327.Count-of-Range-Sum.md" >}})|Hard||||36.2%|
1717
|0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0400~0499/0493.Reverse-Pairs.md" >}})|Hard||||27.8%|
1818
|1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1100~1199/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||41.2%|

website/content/ChapterTwo/Binary_Search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func peakIndexInMountainArray(A []int) int {
149149
|0278|First Bad Version|[Go]({{< relref "/ChapterFour/0200~0299/0278.First-Bad-Version.md" >}})|Easy||||38.4%|
150150
|0287|Find the Duplicate Number|[Go]({{< relref "/ChapterFour/0200~0299/0287.Find-the-Duplicate-Number.md" >}})|Medium| O(n)| O(1)|❤️|58.1%|
151151
|0300|Longest Increasing Subsequence|[Go]({{< relref "/ChapterFour/0300~0399/0300.Longest-Increasing-Subsequence.md" >}})|Medium| O(n log n)| O(n)||45.4%|
152-
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard||||42.3%|
152+
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard||||42.2%|
153153
|0327|Count of Range Sum|[Go]({{< relref "/ChapterFour/0300~0399/0327.Count-of-Range-Sum.md" >}})|Hard||||36.2%|
154154
|0349|Intersection of Two Arrays|[Go]({{< relref "/ChapterFour/0300~0399/0349.Intersection-of-Two-Arrays.md" >}})|Easy| O(n)| O(n) ||66.1%|
155155
|0350|Intersection of Two Arrays II|[Go]({{< relref "/ChapterFour/0300~0399/0350.Intersection-of-Two-Arrays-II.md" >}})|Easy| O(n)| O(n) ||52.5%|

website/content/ChapterTwo/Bit_Manipulation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ X & ~X = 0
106106

107107
----------------------------------------------
108108
<div style="display: flex;justify-content: space-between;align-items: center;">
109-
<p><a href="https://books.halfrost.com/leetcode/ChapterTwo/Sort/">⬅️上一页</a></p>
109+
<p><a href="https://books.halfrost.com/leetcode/ChapterTwo/Sorting/">⬅️上一页</a></p>
110110
<p><a href="https://books.halfrost.com/leetcode/ChapterTwo/Union_Find/">下一页➡️</a></p>
111111
</div>

website/content/ChapterTwo/Math.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ weight: 12
1010
| No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance |
1111
|:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: |
1212
|0002|Add Two Numbers|[Go]({{< relref "/ChapterFour/0001~0099/0002.Add-Two-Numbers.md" >}})|Medium| O(n)| O(1)||36.2%|
13-
|0007|Reverse Integer|[Go]({{< relref "/ChapterFour/0001~0099/0007.Reverse-Integer.md" >}})|Easy||||26.0%|
13+
|0007|Reverse Integer|[Go]({{< relref "/ChapterFour/0001~0099/0007.Reverse-Integer.md" >}})|Easy||||26.1%|
1414
|0009|Palindrome Number|[Go]({{< relref "/ChapterFour/0001~0099/0009.Palindrome-Number.md" >}})|Easy||||50.6%|
1515
|0012|Integer to Roman|[Go]({{< relref "/ChapterFour/0001~0099/0012.Integer-to-Roman.md" >}})|Medium||||57.6%|
1616
|0013|Roman to Integer|[Go]({{< relref "/ChapterFour/0001~0099/0013.Roman-to-Integer.md" >}})|Easy||||57.3%|
@@ -99,7 +99,7 @@ weight: 12
9999
|0991|Broken Calculator|[Go]({{< relref "/ChapterFour/0900~0999/0991.Broken-Calculator.md" >}})|Medium||||49.8%|
100100
|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.6%|
101101
|1006|Clumsy Factorial|[Go]({{< relref "/ChapterFour/1000~1099/1006.Clumsy-Factorial.md" >}})|Medium||||54.1%|
102-
|1017|Convert to Base -2|[Go]({{< relref "/ChapterFour/1000~1099/1017.Convert-to-Base-2.md" >}})|Medium||||59.4%|
102+
|1017|Convert to Base -2|[Go]({{< relref "/ChapterFour/1000~1099/1017.Convert-to-Base-2.md" >}})|Medium||||59.5%|
103103
|1025|Divisor Game|[Go]({{< relref "/ChapterFour/1000~1099/1025.Divisor-Game.md" >}})|Easy| O(1)| O(1)||66.2%|
104104
|1030|Matrix Cells in Distance Order|[Go]({{< relref "/ChapterFour/1000~1099/1030.Matrix-Cells-in-Distance-Order.md" >}})|Easy||||68.5%|
105105
|1037|Valid Boomerang|[Go]({{< relref "/ChapterFour/1000~1099/1037.Valid-Boomerang.md" >}})|Easy||||37.4%|

website/content/ChapterTwo/Segment_Tree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ weight: 18
3939
|:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: |
4040
|0218|The Skyline Problem|[Go]({{< relref "/ChapterFour/0200~0299/0218.The-Skyline-Problem.md" >}})|Hard| O(n log n)| O(n)|❤️|37.1%|
4141
|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0300~0399/0307.Range-Sum-Query-Mutable.md" >}})|Medium| O(1)| O(n)||37.7%|
42-
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard| O(n log n)| O(n)||42.3%|
42+
|0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard| O(n log n)| O(n)||42.2%|
4343
|0327|Count of Range Sum|[Go]({{< relref "/ChapterFour/0300~0399/0327.Count-of-Range-Sum.md" >}})|Hard| O(n log n)| O(n)|❤️|36.2%|
4444
|0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0400~0499/0493.Reverse-Pairs.md" >}})|Hard| O(n log n)| O(n)||27.8%|
4545
|0699|Falling Squares|[Go]({{< relref "/ChapterFour/0600~0699/0699.Falling-Squares.md" >}})|Hard| O(n log n)| O(n)|❤️|43.4%|

0 commit comments

Comments
 (0)