Skip to content

Commit 5d2a085

Browse files
committed
add 15 solutions
1 parent cf716e2 commit 5d2a085

Some content is hidden

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

44 files changed

+2666
-51
lines changed

src/.vuepress/sidebar.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ export default sidebar({
533533
"0976",
534534
"0977",
535535
"0981",
536+
"0983",
536537
"0986",
537538
"0989",
538539
"0993",
@@ -769,6 +770,7 @@ export default sidebar({
769770
"1760",
770771
"1763",
771772
"1768",
773+
"1769",
772774
"1773",
773775
"1779",
774776
"1784",
@@ -818,6 +820,7 @@ export default sidebar({
818820
"1925",
819821
"1926",
820822
"1929",
823+
"1930",
821824
"1935",
822825
"1941",
823826
"1942",
@@ -921,6 +924,7 @@ export default sidebar({
921924
"2262",
922925
"2264",
923926
"2269",
927+
"2270",
924928
"2273",
925929
"2275",
926930
"2278",
@@ -946,7 +950,16 @@ export default sidebar({
946950
"2336",
947951
"2337",
948952
"2341",
953+
"2347",
954+
"2351",
949955
"2352",
956+
"2357",
957+
"2363",
958+
"2367",
959+
"2373",
960+
"2379",
961+
"2381",
962+
"2383",
950963
"2390"
951964
]
952965
},
@@ -963,6 +976,7 @@ export default sidebar({
963976
"2461",
964977
"2462",
965978
"2463",
979+
"2466",
966980
"2471",
967981
"2490",
968982
"2491"
@@ -978,6 +992,7 @@ export default sidebar({
978992
"2542",
979993
"2554",
980994
"2558",
995+
"2559",
981996
"2563",
982997
"2577",
983998
"2583",

src/plan/contest_list.md

Lines changed: 15 additions & 15 deletions
Large diffs are not rendered by default.

src/problem/0001.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ var twoSum = function (nums, target) {
9999
| 2006 | 差的绝对值为 K 的数对数目 | [[]](/problem/2006.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`计数`](/tag/counting.md) | 🟢 | [🀄️](https://leetcode.cn/problems/count-number-of-pairs-with-absolute-difference-k) [🔗](https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k) |
100100
| 2023 | 连接后等于目标字符串的字符串对 | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target) [🔗](https://leetcode.com/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target) |
101101
| 2200 | 找出数组中的所有 K 近邻下标 | [[]](/problem/2200.md) | [`数组`](/tag/array.md) [`双指针`](/tag/two-pointers.md) | 🟢 | [🀄️](https://leetcode.cn/problems/find-all-k-distant-indices-in-an-array) [🔗](https://leetcode.com/problems/find-all-k-distant-indices-in-an-array) |
102-
| 2351 | 第一个出现两次的字母 | | [`位运算`](/tag/bit-manipulation.md) [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/first-letter-to-appear-twice) [🔗](https://leetcode.com/problems/first-letter-to-appear-twice) |
102+
| 2351 | 第一个出现两次的字母 | [[]](/problem/2351.md) | [`位运算`](/tag/bit-manipulation.md) [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/first-letter-to-appear-twice) [🔗](https://leetcode.com/problems/first-letter-to-appear-twice) |
103103
| 2354 | 优质数对的数目 | | [`位运算`](/tag/bit-manipulation.md) [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) `1+` | 🔴 | [🀄️](https://leetcode.cn/problems/number-of-excellent-pairs) [🔗](https://leetcode.com/problems/number-of-excellent-pairs) |
104-
| 2367 | 等差三元组的数目 | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`双指针`](/tag/two-pointers.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/number-of-arithmetic-triplets) [🔗](https://leetcode.com/problems/number-of-arithmetic-triplets) |
104+
| 2367 | 等差三元组的数目 | [[]](/problem/2367.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`双指针`](/tag/two-pointers.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/number-of-arithmetic-triplets) [🔗](https://leetcode.com/problems/number-of-arithmetic-triplets) |
105105
| 2374 | 边积分最高的节点 | | [``](/tag/graph.md) [`哈希表`](/tag/hash-table.md) | 🟠 | [🀄️](https://leetcode.cn/problems/node-with-highest-edge-score) [🔗](https://leetcode.com/problems/node-with-highest-edge-score) |
106106
| 2395 | 和相等的子数组 | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) | 🟢 | [🀄️](https://leetcode.cn/problems/find-subarrays-with-equal-sum) [🔗](https://leetcode.com/problems/find-subarrays-with-equal-sum) |
107107
| 2399 | 检查相同字母间的距离 | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) | 🟢 | [🀄️](https://leetcode.cn/problems/check-distances-between-same-letters) [🔗](https://leetcode.com/problems/check-distances-between-same-letters) |

src/problem/0015.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,6 @@ var threeSum = function (nums) {
145145
| 16 | 最接近的三数之和 | [[]](/problem/0016.md) | [`数组`](/tag/array.md) [`双指针`](/tag/two-pointers.md) [`排序`](/tag/sorting.md) | 🟠 | [🀄️](https://leetcode.cn/problems/3sum-closest) [🔗](https://leetcode.com/problems/3sum-closest) |
146146
| 18 | 四数之和 | [[]](/problem/0018.md) | [`数组`](/tag/array.md) [`双指针`](/tag/two-pointers.md) [`排序`](/tag/sorting.md) | 🟠 | [🀄️](https://leetcode.cn/problems/4sum) [🔗](https://leetcode.com/problems/4sum) |
147147
| 259 | 较小的三数之和 🔒 | [[]](/problem/0259.md) | [`数组`](/tag/array.md) [`双指针`](/tag/two-pointers.md) [`二分查找`](/tag/binary-search.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/3sum-smaller) [🔗](https://leetcode.com/problems/3sum-smaller) |
148-
| 2367 | 等差三元组的数目 | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`双指针`](/tag/two-pointers.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/number-of-arithmetic-triplets) [🔗](https://leetcode.com/problems/number-of-arithmetic-triplets) |
148+
| 2367 | 等差三元组的数目 | [[]](/problem/2367.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`双指针`](/tag/two-pointers.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/number-of-arithmetic-triplets) [🔗](https://leetcode.com/problems/number-of-arithmetic-triplets) |
149149
| 2908 | 元素和最小的山形三元组 I | | [`数组`](/tag/array.md) | 🟢 | [🀄️](https://leetcode.cn/problems/minimum-sum-of-mountain-triplets-i) [🔗](https://leetcode.com/problems/minimum-sum-of-mountain-triplets-i) |
150150
| 2909 | 元素和最小的山形三元组 II | | [`数组`](/tag/array.md) | 🟠 | [🀄️](https://leetcode.cn/problems/minimum-sum-of-mountain-triplets-ii) [🔗](https://leetcode.com/problems/minimum-sum-of-mountain-triplets-ii) |

src/problem/0070.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ var climbStairs = function (n) {
107107
| 2244 | 完成所有任务需要的最少轮数 | | [`贪心`](/tag/greedy.md) [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) `1+` | 🟠 | [🀄️](https://leetcode.cn/problems/minimum-rounds-to-complete-all-tasks) [🔗](https://leetcode.com/problems/minimum-rounds-to-complete-all-tasks) |
108108
| 2320 | 统计放置房子的方式数 | | [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/count-number-of-ways-to-place-houses) [🔗](https://leetcode.com/problems/count-number-of-ways-to-place-houses) |
109109
| 2400 | 恰好移动 k 步到达某一位置的方法数目 | | [`数学`](/tag/math.md) [`动态规划`](/tag/dynamic-programming.md) [`组合数学`](/tag/combinatorics.md) | 🟠 | [🀄️](https://leetcode.cn/problems/number-of-ways-to-reach-a-position-after-exactly-k-steps) [🔗](https://leetcode.com/problems/number-of-ways-to-reach-a-position-after-exactly-k-steps) |
110-
| 2466 | 统计构造好字符串的方案数 | | [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/count-ways-to-build-good-strings) [🔗](https://leetcode.com/problems/count-ways-to-build-good-strings) |
110+
| 2466 | 统计构造好字符串的方案数 | [[]](/problem/2466.md) | [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/count-ways-to-build-good-strings) [🔗](https://leetcode.com/problems/count-ways-to-build-good-strings) |
111111
| 2498 | 青蛙过河 II | | [`贪心`](/tag/greedy.md) [`数组`](/tag/array.md) [`二分查找`](/tag/binary-search.md) | 🟠 | [🀄️](https://leetcode.cn/problems/frog-jump-ii) [🔗](https://leetcode.com/problems/frog-jump-ii) |
112112
| 3154 | 到达第 K 级台阶的方案数 | | [`位运算`](/tag/bit-manipulation.md) [`记忆化搜索`](/tag/memoization.md) [`数学`](/tag/math.md) `2+` | 🔴 | [🀄️](https://leetcode.cn/problems/find-number-of-ways-to-reach-the-k-th-stair) [🔗](https://leetcode.com/problems/find-number-of-ways-to-reach-the-k-th-stair) |
113113
| 3183 | 达到总和的方法数量 🔒 | | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/the-number-of-ways-to-make-the-sum) [🔗](https://leetcode.com/problems/the-number-of-ways-to-make-the-sum) |

src/problem/0217.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ var containsDuplicate = function (nums) {
7575
| :------: | :------ | :------: | :------ | :------: | :------: |
7676
| 219 | 存在重复元素 II | [[]](/problem/0219.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`滑动窗口`](/tag/sliding-window.md) | 🟢 | [🀄️](https://leetcode.cn/problems/contains-duplicate-ii) [🔗](https://leetcode.com/problems/contains-duplicate-ii) |
7777
| 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) |
78-
| 2357 | 使数组中所有元素都等于零 | | [`贪心`](/tag/greedy.md) [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) `3+` | 🟢 | [🀄️](https://leetcode.cn/problems/make-array-zero-by-subtracting-equal-amounts) [🔗](https://leetcode.com/problems/make-array-zero-by-subtracting-equal-amounts) |
78+
| 2357 | 使数组中所有元素都等于零 | [[]](/problem/2357.md) | [`贪心`](/tag/greedy.md) [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) `3+` | 🟢 | [🀄️](https://leetcode.cn/problems/make-array-zero-by-subtracting-equal-amounts) [🔗](https://leetcode.com/problems/make-array-zero-by-subtracting-equal-amounts) |

src/problem/0307.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@ class NumArray {
161161
| :------: | :------ | :------: | :------ | :------: | :------: |
162162
| 303 | 区域和检索 - 数组不可变 | [[]](/problem/0303.md) | [`设计`](/tag/design.md) [`数组`](/tag/array.md) [`前缀和`](/tag/prefix-sum.md) | 🟢 | [🀄️](https://leetcode.cn/problems/range-sum-query-immutable) [🔗](https://leetcode.com/problems/range-sum-query-immutable) |
163163
| 308 | 二维区域和检索 - 矩阵可修改 🔒 | | [`设计`](/tag/design.md) [`树状数组`](/tag/binary-indexed-tree.md) [`线段树`](/tag/segment-tree.md) `2+` | 🔴 | [🀄️](https://leetcode.cn/problems/range-sum-query-2d-mutable) [🔗](https://leetcode.com/problems/range-sum-query-2d-mutable) |
164-
| 2381 | 字母移位 II | | [`数组`](/tag/array.md) [`字符串`](/tag/string.md) [`前缀和`](/tag/prefix-sum.md) | 🟠 | [🀄️](https://leetcode.cn/problems/shifting-letters-ii) [🔗](https://leetcode.com/problems/shifting-letters-ii) |
164+
| 2381 | 字母移位 II | [[]](/problem/2381.md) | [`数组`](/tag/array.md) [`字符串`](/tag/string.md) [`前缀和`](/tag/prefix-sum.md) | 🟠 | [🀄️](https://leetcode.cn/problems/shifting-letters-ii) [🔗](https://leetcode.com/problems/shifting-letters-ii) |

src/problem/0322.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var coinChange = function (coins, amount) {
111111
<!-- prettier-ignore -->
112112
| 题号 | 标题 | 题解 | 标签 | 难度 | 力扣 |
113113
| :------: | :------ | :------: | :------ | :------: | :------: |
114-
| 983 | 最低票价 | | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/minimum-cost-for-tickets) [🔗](https://leetcode.com/problems/minimum-cost-for-tickets) |
114+
| 983 | 最低票价 | [[]](/problem/0983.md) | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) | 🟠 | [🀄️](https://leetcode.cn/problems/minimum-cost-for-tickets) [🔗](https://leetcode.com/problems/minimum-cost-for-tickets) |
115115
| 2218 | 从栈中取出 K 个硬币的最大面值和 | | [`数组`](/tag/array.md) [`动态规划`](/tag/dynamic-programming.md) [`前缀和`](/tag/prefix-sum.md) | 🔴 | [🀄️](https://leetcode.cn/problems/maximum-value-of-k-coins-from-piles) [🔗](https://leetcode.com/problems/maximum-value-of-k-coins-from-piles) |
116116
| 2224 | 转化时间需要的最少操作数 | [[]](/problem/2224.md) | [`贪心`](/tag/greedy.md) [`字符串`](/tag/string.md) | 🟢 | [🀄️](https://leetcode.cn/problems/minimum-number-of-operations-to-convert-time) [🔗](https://leetcode.com/problems/minimum-number-of-operations-to-convert-time) |
117117
| 2547 | 拆分数组的最小代价 | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`动态规划`](/tag/dynamic-programming.md) `1+` | 🔴 | [🀄️](https://leetcode.cn/problems/minimum-cost-to-split-an-array) [🔗](https://leetcode.com/problems/minimum-cost-to-split-an-array) |

src/problem/0387.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,4 @@ var firstUniqChar = function (s) {
121121
| 题号 | 标题 | 题解 | 标签 | 难度 | 力扣 |
122122
| :------: | :------ | :------: | :------ | :------: | :------: |
123123
| 451 | 根据字符出现频率排序 | [[]](/problem/0451.md) | [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) [`桶排序`](/tag/bucket-sort.md) `3+` | 🟠 | [🀄️](https://leetcode.cn/problems/sort-characters-by-frequency) [🔗](https://leetcode.com/problems/sort-characters-by-frequency) |
124-
| 2351 | 第一个出现两次的字母 | | [`位运算`](/tag/bit-manipulation.md) [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/first-letter-to-appear-twice) [🔗](https://leetcode.com/problems/first-letter-to-appear-twice) |
124+
| 2351 | 第一个出现两次的字母 | [[]](/problem/2351.md) | [`位运算`](/tag/bit-manipulation.md) [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) `1+` | 🟢 | [🀄️](https://leetcode.cn/problems/first-letter-to-appear-twice) [🔗](https://leetcode.com/problems/first-letter-to-appear-twice) |

src/problem/0724.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,5 @@ var pivotIndex = function (nums) {
124124
| 560 | 和为 K 的子数组 | [[]](/problem/0560.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`前缀和`](/tag/prefix-sum.md) | 🟠 | [🀄️](https://leetcode.cn/problems/subarray-sum-equals-k) [🔗](https://leetcode.com/problems/subarray-sum-equals-k) |
125125
| 1991 | 找到数组的中间位置 | [[]](/problem/1991.md) | [`数组`](/tag/array.md) [`前缀和`](/tag/prefix-sum.md) | 🟢 | [🀄️](https://leetcode.cn/problems/find-the-middle-index-in-array) [🔗](https://leetcode.com/problems/find-the-middle-index-in-array) |
126126
| 2219 | 数组的最大总分 🔒 | | [`数组`](/tag/array.md) [`前缀和`](/tag/prefix-sum.md) | 🟠 | [🀄️](https://leetcode.cn/problems/maximum-sum-score-of-array) [🔗](https://leetcode.com/problems/maximum-sum-score-of-array) |
127-
| 2270 | 分割数组的方案数 | | [`数组`](/tag/array.md) [`前缀和`](/tag/prefix-sum.md) | 🟠 | [🀄️](https://leetcode.cn/problems/number-of-ways-to-split-array) [🔗](https://leetcode.com/problems/number-of-ways-to-split-array) |
127+
| 2270 | 分割数组的方案数 | [[]](/problem/2270.md) | [`数组`](/tag/array.md) [`前缀和`](/tag/prefix-sum.md) | 🟠 | [🀄️](https://leetcode.cn/problems/number-of-ways-to-split-array) [🔗](https://leetcode.com/problems/number-of-ways-to-split-array) |
128128
| 2574 | 左右元素和的差值 | | [`数组`](/tag/array.md) [`前缀和`](/tag/prefix-sum.md) | 🟢 | [🀄️](https://leetcode.cn/problems/left-and-right-sum-differences) [🔗](https://leetcode.com/problems/left-and-right-sum-differences) |

0 commit comments

Comments
 (0)