Skip to content

Commit f67e572

Browse files
committed
add 13 solutions
1 parent 5d2a085 commit f67e572

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2530
-88
lines changed

src/.vuepress/sidebar.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ export default sidebar({
104104
"0085",
105105
"0086",
106106
"0088",
107+
"0089",
107108
"0090",
109+
"0091",
108110
"0092",
109111
"0093",
110112
"0094",
@@ -176,6 +178,9 @@ export default sidebar({
176178
"0156",
177179
"0160",
178180
"0162",
181+
"0164",
182+
"0165",
183+
"0166",
179184
"0167",
180185
"0168",
181186
"0169",
@@ -186,9 +191,11 @@ export default sidebar({
186191
"0174",
187192
"0175",
188193
"0177",
194+
"0179",
189195
"0181",
190196
"0182",
191197
"0183",
198+
"0187",
192199
"0188",
193200
"0189",
194201
"0190",
@@ -206,6 +213,7 @@ export default sidebar({
206213
"0201",
207214
"0202",
208215
"0203",
216+
"0204",
209217
"0205",
210218
"0206",
211219
"0207",
@@ -214,17 +222,20 @@ export default sidebar({
214222
"0210",
215223
"0211",
216224
"0212",
225+
"0213",
217226
"0215",
218227
"0216",
219228
"0217",
220229
"0219",
221230
"0221",
222231
"0222",
232+
"0223",
223233
"0224",
224234
"0225",
225235
"0226",
226236
"0227",
227237
"0228",
238+
"0229",
228239
"0230",
229240
"0231",
230241
"0232",
@@ -508,6 +519,7 @@ export default sidebar({
508519
"0908",
509520
"0909",
510521
"0914",
522+
"0916",
511523
"0917",
512524
"0918",
513525
"0921",
@@ -1123,6 +1135,7 @@ export default sidebar({
11231135
"collapsible": true,
11241136
"children": [
11251137
"3011",
1138+
"3042",
11261139
"3097"
11271140
]
11281141
},

src/book/bit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
| 1009 | 十进制整数的反码 | [[]](/problem/1009.md) | [`位运算`](/tag/bit-manipulation.md) | 🟢 | [🀄️](https://leetcode.cn/problems/complement-of-base-10-integer) [🔗](https://leetcode.com/problems/complement-of-base-10-integer) |
1717
| 191 | 位1的个数 | [[]](/problem/0191.md) | [`位运算`](/tag/bit-manipulation.md) [`分治`](/tag/divide-and-conquer.md) | 🟢 | [🀄️](https://leetcode.cn/problems/number-of-1-bits) [🔗](https://leetcode.com/problems/number-of-1-bits) |
1818
| 371 | 两整数之和 | | [`位运算`](/tag/bit-manipulation.md) [`数学`](/tag/math.md) | 🟠 | [🀄️](https://leetcode.cn/problems/sum-of-two-integers) [🔗](https://leetcode.com/problems/sum-of-two-integers) |
19-
| 89 | 格雷编码 | | [`位运算`](/tag/bit-manipulation.md) [`数学`](/tag/math.md) [`回溯`](/tag/backtracking.md) | 🟠 | [🀄️](https://leetcode.cn/problems/gray-code) [🔗](https://leetcode.com/problems/gray-code) |
19+
| 89 | 格雷编码 | [[]](/problem/0089.md) | [`位运算`](/tag/bit-manipulation.md) [`数学`](/tag/math.md) [`回溯`](/tag/backtracking.md) | 🟠 | [🀄️](https://leetcode.cn/problems/gray-code) [🔗](https://leetcode.com/problems/gray-code) |
2020
| 201 | 数字范围按位与 | [[]](/problem/0201.md) | [`位运算`](/tag/bit-manipulation.md) | 🟠 | [🀄️](https://leetcode.cn/problems/bitwise-and-of-numbers-range) [🔗](https://leetcode.com/problems/bitwise-and-of-numbers-range) |
2121
| 338 | 比特位计数 | [[]](/problem/0338.md) | [`位运算`](/tag/bit-manipulation.md) [`动态规划`](/tag/dynamic-programming.md) | 🟢 | [🀄️](https://leetcode.cn/problems/counting-bits) [🔗](https://leetcode.com/problems/counting-bits) |
2222
| 136 | 只出现一次的数字 | [[]](/problem/0136.md) | [`位运算`](/tag/bit-manipulation.md) [`数组`](/tag/array.md) | 🟢 | [🀄️](https://leetcode.cn/problems/single-number) [🔗](https://leetcode.com/problems/single-number) |

src/book/dynamic_programming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
| 152 | 乘积最大子数组 | [[]](/problem/0152.md) | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/maximum-product-subarray) [🔗](https://leetcode.com/problems/maximum-product-subarray) |
7676
| 918 | 环形子数组的最大和 | [[]](/problem/0918.md) | [`队列`](/tag/queue.md) [`数组`](/tag/array.md) [`分治`](/tag/divide-and-conquer.md) `2+` | 🟠 | [🀄️](https://leetcode.cn/problems/maximum-sum-circular-subarray) [🔗](https://leetcode.com/problems/maximum-sum-circular-subarray) |
7777
| 198 | 打家劫舍 | [[]](/problem/0198.md) | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/house-robber) [🔗](https://leetcode.com/problems/house-robber) |
78-
| 213 | 打家劫舍 II | | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/house-robber-ii) [🔗](https://leetcode.com/problems/house-robber-ii) |
78+
| 213 | 打家劫舍 II | [[]](/problem/0213.md) | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/house-robber-ii) [🔗](https://leetcode.com/problems/house-robber-ii) |
7979
| 740 | 删除并获得点数 | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/delete-and-earn) [🔗](https://leetcode.com/problems/delete-and-earn) |
8080
| 1388 | 3n 块披萨 | | [`贪心`](/tag/greedy.md) [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) `1+` | 🔴 | [🀄️](https://leetcode.cn/problems/pizza-with-3n-slices) [🔗](https://leetcode.com/problems/pizza-with-3n-slices) |
8181
| 873 | 最长的斐波那契子序列的长度 | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/length-of-longest-fibonacci-subsequence) [🔗](https://leetcode.com/problems/length-of-longest-fibonacci-subsequence) |
@@ -84,7 +84,7 @@
8484
| 368 | 最大整除子集 | | [`数组`](/tag/array.md) [`数学`](/tag/math.md) [`动态规划`](/tag/dynamic-programming.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/largest-divisible-subset) [🔗](https://leetcode.com/problems/largest-divisible-subset) |
8585
| 32 | 最长有效括号 | [[]](/problem/0032.md) | [``](/tag/stack.md) [`字符串`](/tag/string.md) [`动态规划`](/tag/dynamic-programming.md) | 🔴 | [🀄️](https://leetcode.cn/problems/longest-valid-parentheses) [🔗](https://leetcode.com/problems/longest-valid-parentheses) |
8686
| 413 | 等差数列划分 | | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) [`滑动窗口`](/tag/sliding-window.md) | 🟠 | [🀄️](https://leetcode.cn/problems/arithmetic-slices) [🔗](https://leetcode.com/problems/arithmetic-slices) |
87-
| 91 | 解码方法 | | [`字符串`](/tag/string.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/decode-ways) [🔗](https://leetcode.com/problems/decode-ways) |
87+
| 91 | 解码方法 | [[]](/problem/0091.md) | [`字符串`](/tag/string.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/decode-ways) [🔗](https://leetcode.com/problems/decode-ways) |
8888
| 639 | 解码方法 II | | [`字符串`](/tag/string.md) [`动态规划`](/tag/dynamic-programming.md) | 🔴 | [🀄️](https://leetcode.cn/problems/decode-ways-ii) [🔗](https://leetcode.com/problems/decode-ways-ii) |
8989
| 132 | 分割回文串 II | [[]](/problem/0132.md) | [`字符串`](/tag/string.md) [`动态规划`](/tag/dynamic-programming.md) | 🔴 | [🀄️](https://leetcode.cn/problems/palindrome-partitioning-ii) [🔗](https://leetcode.com/problems/palindrome-partitioning-ii) |
9090
| 1220 | 统计元音字母序列的数目 | | [`动态规划`](/tag/dynamic-programming.md) | 🔴 | [🀄️](https://leetcode.cn/problems/count-vowels-permutation) [🔗](https://leetcode.com/problems/count-vowels-permutation) |

src/book/enumeration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| 题号 | 标题 | 题解 | 标签 | 难度 | 力扣 |
1212
| :------: | :------ | :------: | :------ | :------: | :------: |
1313
| 1 | 两数之和 | [[]](/problem/0001.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) | 🟢 | [🀄️](https://leetcode.cn/problems/two-sum) [🔗](https://leetcode.com/problems/two-sum) |
14-
| 204 | 计数质数 | | [`数组`](/tag/array.md) [`数学`](/tag/math.md) [`枚举`](/tag/enumeration.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/count-primes) [🔗](https://leetcode.com/problems/count-primes) |
14+
| 204 | 计数质数 | [[]](/problem/0204.md) | [`数组`](/tag/array.md) [`数学`](/tag/math.md) [`枚举`](/tag/enumeration.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/count-primes) [🔗](https://leetcode.com/problems/count-primes) |
1515
| 1925 | 统计平方和三元组的数目 | [[]](/problem/1925.md) | [`数学`](/tag/math.md) [`枚举`](/tag/enumeration.md) | 🟢 | [🀄️](https://leetcode.cn/problems/count-square-sum-triples) [🔗](https://leetcode.com/problems/count-square-sum-triples) |
1616
| 1450 | 在既定时间做作业的学生人数 | [[]](/problem/1450.md) | [`数组`](/tag/array.md) | 🟢 | [🀄️](https://leetcode.cn/problems/number-of-students-doing-homework-at-a-given-time) [🔗](https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time) |
1717
| 1620 | 网络信号最好的坐标 | | [`数组`](/tag/array.md) [`枚举`](/tag/enumeration.md) | 🟠 | [🀄️](https://leetcode.cn/problems/coordinate-with-maximum-network-quality) [🔗](https://leetcode.com/problems/coordinate-with-maximum-network-quality) |

src/book/sort.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,14 @@ function swap(arr, i, j) {
410410
| :------: | :------ | :------: | :------ | :------: | :------: |
411411
| 912 | 排序数组 | | [`数组`](/tag/array.md) [`分治`](/tag/divide-and-conquer.md) [`桶排序`](/tag/bucket-sort.md) `5+` | 🟠 | [🀄️](https://leetcode.cn/problems/sort-an-array) [🔗](https://leetcode.com/problems/sort-an-array) |
412412
| 220 | 存在重复元素 III | | [`数组`](/tag/array.md) [`桶排序`](/tag/bucket-sort.md) [`有序集合`](/tag/ordered-set.md) `2+` | 🔴 | [🀄️](https://leetcode.cn/problems/contains-duplicate-iii) [🔗](https://leetcode.com/problems/contains-duplicate-iii) |
413-
| 164 | 最大间距 | | [`数组`](/tag/array.md) [`桶排序`](/tag/bucket-sort.md) [`基数排序`](/tag/radix-sort.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/maximum-gap) [🔗](https://leetcode.com/problems/maximum-gap) |
413+
| 164 | 最大间距 | [[]](/problem/0164.md) | [`数组`](/tag/array.md) [`桶排序`](/tag/bucket-sort.md) [`基数排序`](/tag/radix-sort.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/maximum-gap) [🔗](https://leetcode.com/problems/maximum-gap) |
414414

415415
* 基数排序
416416

417417
<!-- prettier-ignore -->
418418
| 题号 | 标题 | 题解 | 标签 | 难度 | 力扣 |
419419
| :------: | :------ | :------: | :------ | :------: | :------: |
420-
| 164 | 最大间距 | | [`数组`](/tag/array.md) [`桶排序`](/tag/bucket-sort.md) [`基数排序`](/tag/radix-sort.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/maximum-gap) [🔗](https://leetcode.com/problems/maximum-gap) |
420+
| 164 | 最大间距 | [[]](/problem/0164.md) | [`数组`](/tag/array.md) [`桶排序`](/tag/bucket-sort.md) [`基数排序`](/tag/radix-sort.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/maximum-gap) [🔗](https://leetcode.com/problems/maximum-gap) |
421421
| 561 | 数组拆分 | [[]](/problem/0561.md) | [`贪心`](/tag/greedy.md) [`数组`](/tag/array.md) [`计数排序`](/tag/counting-sort.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/array-partition) [🔗](https://leetcode.com/problems/array-partition) |
422422

423423
* 其他排序
@@ -428,7 +428,7 @@ function swap(arr, i, j) {
428428
| 217 | 存在重复元素 | [[]](/problem/0217.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`排序`](/tag/sorting.md) | 🟢 | [🀄️](https://leetcode.cn/problems/contains-duplicate) [🔗](https://leetcode.com/problems/contains-duplicate) |
429429
| 136 | 只出现一次的数字 | [[]](/problem/0136.md) | [`位运算`](/tag/bit-manipulation.md) [`数组`](/tag/array.md) | 🟢 | [🀄️](https://leetcode.cn/problems/single-number) [🔗](https://leetcode.com/problems/single-number) |
430430
| 56 | 合并区间 | [[]](/problem/0056.md) | [`数组`](/tag/array.md) [`排序`](/tag/sorting.md) | 🟠 | [🀄️](https://leetcode.cn/problems/merge-intervals) [🔗](https://leetcode.com/problems/merge-intervals) |
431-
| 179 | 最大数 | | [`贪心`](/tag/greedy.md) [`数组`](/tag/array.md) [`字符串`](/tag/string.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/largest-number) [🔗](https://leetcode.com/problems/largest-number) |
431+
| 179 | 最大数 | [[]](/problem/0179.md) | [`贪心`](/tag/greedy.md) [`数组`](/tag/array.md) [`字符串`](/tag/string.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/largest-number) [🔗](https://leetcode.com/problems/largest-number) |
432432
| 384 | 打乱数组 | | [`数组`](/tag/array.md) [`数学`](/tag/math.md) [`随机化`](/tag/randomized.md) | 🟠 | [🀄️](https://leetcode.cn/problems/shuffle-an-array) [🔗](https://leetcode.com/problems/shuffle-an-array) |
433433
| 剑指 Offer 45 | 把数组排成最小的数 | [[]](/offer/jz_offer_45_1.md) | [`贪心`](/tag/greedy.md) [`字符串`](/tag/string.md) [`排序`](/tag/sorting.md) | 🟠 | [🀄️](https://leetcode.cn/problems/ba-shu-zu-pai-cheng-zui-xiao-de-shu-lcof) |
434434

0 commit comments

Comments
 (0)