Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ac585c2

Browse files
✨feat: 1744、1760、583、84
1 parent cc36e27 commit ac585c2

File tree

5 files changed

+32
-22
lines changed

5 files changed

+32
-22
lines changed

‎Index/二分.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
| [1707. 与数组中元素的最大异或值](https://leetcode-cn.com/problems/maximum-xor-with-an-element-from-array/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/maximum-xor-with-an-element-from-array/solution/gong-shui-san-xie-jie-zhe-ge-wen-ti-lai-lypqr/) | 困难 | 🤩🤩🤩 |
6767
| [1713. 得到子序列的最少操作次数](https://leetcode-cn.com/problems/minimum-operations-to-make-a-subsequence/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/minimum-operations-to-make-a-subsequence/solution/gong-shui-san-xie-noxiang-xin-ke-xue-xi-oj7yu/) | 困难 | 🤩🤩🤩 |
6868
| [1751. 最多可以参加的会议数目 II](https://leetcode-cn.com/problems/maximum-number-of-events-that-can-be-attended-ii/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/maximum-number-of-events-that-can-be-attended-ii/solution/po-su-dp-er-fen-dp-jie-fa-by-ac_oier-88du/) | 困难 | 🤩🤩🤩 |
69-
| [1760. 袋子里最少数目的球](https://leetcode.cn/problems/minimum-limit-of-balls-in-a-bag/) | [LeetCode 题解链接](https://acoier.com/2022/12/23/1760.%20%E8%A2%8B%E5%AD%90%E9%87%8C%E6%9C%80%E5%B0%91%E6%95%B0%E7%9B%AE%E7%9A%84%E7%90%83%EF%BC%88%E4%B8%AD%E7%AD%89%EF%BC%89/) | 中等 | 🤩🤩🤩🤩🤩 |
69+
| [1760. 袋子里最少数目的球](https://leetcode.cn/problems/minimum-limit-of-balls-in-a-bag/) | [LeetCode 题解链接](https://acoier.com/2022/12/26/1760.%20%E8%A2%8B%E5%AD%90%E9%87%8C%E6%9C%80%E5%B0%91%E6%95%B0%E7%9B%AE%E7%9A%84%E7%90%83%EF%BC%88%E4%B8%AD%E7%AD%89%EF%BC%89/) | 中等 | 🤩🤩🤩🤩🤩 |
7070
| [1802. 有界数组中指定下标处的最大值](https://leetcode.cn/problems/maximum-value-at-a-given-index-in-a-bounded-array/) | [LeetCode 题解链接](https://acoier.com/2023/01/06/1802.%20%E6%9C%89%E7%95%8C%E6%95%B0%E7%BB%84%E4%B8%AD%E6%8C%87%E5%AE%9A%E4%B8%8B%E6%A0%87%E5%A4%84%E7%9A%84%E6%9C%80%E5%A4%A7%E5%80%BC%EF%BC%88%E4%B8%AD%E7%AD%89%EF%BC%89/) | 中等 | 🤩🤩🤩🤩 |
7171
| [1818. 绝对差值和](https://leetcode-cn.com/problems/minimum-absolute-sum-difference/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/minimum-absolute-sum-difference/solution/gong-shui-san-xie-tong-guo-er-fen-zhao-z-vrmq/) | 中等 | 🤩🤩🤩🤩🤩 |
7272
| [1838. 最高频元素的频数](https://leetcode-cn.com/problems/frequency-of-the-most-frequent-element/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/frequency-of-the-most-frequent-element/solution/gong-shui-san-xie-cong-mei-ju-dao-pai-xu-kxnk/) | 中等 | 🤩🤩🤩 |

‎LeetCode/1741-1750/1744. 你能在你最喜欢的那天吃到你最喜欢的糖果吗?(中等).md‎

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@ Tag : 「前缀和」
66

77

88

9-
给你一个下标从 0 开始的正整数数组 candiesCount ,其中 candiesCount[i] 表示你拥有的第 i 类糖果的数目。同时给你一个二维数组 queries ,其中 queries[i] = [favoriteTypei, favoriteDayi, dailyCapi]
9+
给你一个下标从 `0` 开始的正整数数组 `candiesCount`,其中 `candiesCount[i]` 表示你拥有的第 `i` 类糖果的数目。
10+
11+
同时给你一个二维数组 `queries` ,其中 $queries[i] = [favoriteType_{i}, favoriteDay_{i}, dailyCap_{i}]$ 。
1012

1113
你按照如下规则进行一场游戏:
1214

13-
* 你从第 0 天开始吃糖果。
14-
* 你在吃完 所有 第 i - 1 类糖果之前,不能 吃任何一颗第 i 类糖果。
15+
* 你从第 `0` 天开始吃糖果。
16+
* 你在吃完 所有 第 `i - 1` 类糖果之前,不能 吃任何一颗第 `i` 类糖果。
1517
* 在吃完所有糖果之前,你必须每天 至少 吃 一颗 糖果。
1618

17-
请你构建一个布尔型数组 answer ,满足 answer.length == queries.length 。answer[i] 为 true 的条件是:在每天吃 不超过 dailyCapi 颗糖果的前提下,你可以在第 favoriteDayi 天吃到第 favoriteTypei 类糖果;否则 answer[i] 为 false 。注意,只要满足上面 3 条规则中的第二条规则,你就可以在同一天吃不同类型的糖果。
19+
请你构建一个布尔型数组 `answer`,满足 `answer.length == queries.length``answer[i]``true` 的条件是:在每天吃 不超过 $dailyCap_i$ 颗糖果的前提下,你可以在第 $favoriteDay_i$ 天吃到第 $favoriteType_i$ 类糖果;否则 `answer[i]``false`。注意,只要满足上面 `3` 条规则中的第二条规则,你就可以在同一天吃不同类型的糖果。
20+
21+
请你返回得到的数组 `answer`
1822

19-
请你返回得到的数组 answer 。
2023

21-
2224

2325
示例 1:
2426
```
2527
输入:candiesCount = [7,4,5,3,8], queries = [[0,2,2],[4,2,4],[2,13,1000000000]]
28+
2629
输出:[true,false,true]
30+
2731
提示:
2832
1- 在第 0 天吃 2 颗糖果(类型 0),第 1 天吃 2 颗糖果(类型 0),第 2 天你可以吃到类型 0 的糖果。
2933
2- 每天你最多吃 4 颗糖果。即使第 0 天吃 4 颗糖果(类型 0),第 1 天吃 4 颗糖果(类型 0 和类型 1),你也没办法在第 2 天吃到类型 4 的糖果。换言之,你没法在每天吃 4 颗糖果的限制下在第 2 天吃到第 4 类糖果。
@@ -32,17 +36,18 @@ Tag : 「前缀和」
3236
示例 2:
3337
```
3438
输入:candiesCount = [5,2,6,4,1], queries = [[3,1,2],[4,10,3],[3,10,100],[4,100,30],[1,3,1]]
39+
3540
输出:[false,true,true,false,false]
3641
```
3742

3843
提示:
39-
* 1 <= candiesCount.length <= $10^5$
40-
* 1 <= candiesCount[i] <= $10^5$
41-
* 1 <= queries.length <= $10^5$
42-
* queries[i].length == 3
43-
* 0 <= favoriteTypei < candiesCount.length
44-
* 0 <= favoriteDayi <= $10^9$
45-
* 1 <= dailyCapi <= $10^9$
44+
* $1 <= candiesCount.length <= 10^5$
45+
* $1 <= candiesCount[i] <= 10^5$
46+
* $1 <= queries.length <= 10^5$
47+
* $queries[i].length == 3$
48+
* $0 <= favoriteType_{i} < candiesCount.length$
49+
* $0 <= favoriteDay_{i} <= 10^9$
50+
* $1 <= dailyCap_{i} <= 10^9$
4651

4752
---
4853

‎LeetCode/1751-1760/1760. 袋子里最少数目的球(中等).md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### 题目描述
22

3-
这是 LeetCode 上的 **[1760. 袋子里最少数目的球](https://acoier.com/2022/12/23/1760.%20%E8%A2%8B%E5%AD%90%E9%87%8C%E6%9C%80%E5%B0%91%E6%95%B0%E7%9B%AE%E7%9A%84%E7%90%83%EF%BC%88%E4%B8%AD%E7%AD%89%EF%BC%89/)** ,难度为 **中等**
3+
这是 LeetCode 上的 **[1760. 袋子里最少数目的球](https://acoier.com/2022/12/26/1760.%20%E8%A2%8B%E5%AD%90%E9%87%8C%E6%9C%80%E5%B0%91%E6%95%B0%E7%9B%AE%E7%9A%84%E7%90%83%EF%BC%88%E4%B8%AD%E7%AD%89%EF%BC%89/)** ,难度为 **中等**
44

55
Tag : 「二分」
66

‎LeetCode/581-590/583. 两个字符串的删除操作(中等).md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44

55
Tag : 「最长公共子序列」、「序列 DP」
66

7-
给定两个单词 word1 和 word2,找到使得 word1 和 word2 相同所需的最小步数,每步可以删除任意一个字符串中的一个字符。
7+
8+
9+
给定两个单词 `word1``word2`,找到使得 `word1``word2` 相同所需的最小步数,每步可以删除任意一个字符串中的一个字符。
810

911
示例:
12+
1013
```
1114
输入: "sea", "eat"
1215
@@ -16,7 +19,7 @@ Tag : 「最长公共子序列」、「序列 DP」
1619
```
1720

1821
提示:
19-
* 给定单词的长度不超过500
22+
* 给定单词的长度不超过 500ドル$
2023
* 给定单词中的字符只含有小写字母。
2124

2225
---
@@ -67,8 +70,8 @@ class Solution {
6770
}
6871
}
6972
```
70-
* 时间复杂度:$O(n * m)$
71-
* 空间复杂度:$O(n * m)$
73+
* 时间复杂度:$O(n \times m)$
74+
* 空间复杂度:$O(n \times m)$
7275

7376
---
7477

@@ -104,8 +107,8 @@ class Solution {
104107
}
105108
}
106109
```
107-
* 时间复杂度:$O(n * m)$
108-
* 空间复杂度:$O(n * m)$
110+
* 时间复杂度:$O(n \times m)$
111+
* 空间复杂度:$O(n \times m)$
109112

110113
---
111114

‎LeetCode/81-90/84. 柱状图中最大的矩形(困难).md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### 题目描述
22

3-
这是 LeetCode 上的 **[84. 柱状图中最大的矩形](https://leetcode.cn/problems/largest-rectangle-in-histogram/solution/by-ac_oier-i470/)** ,难度为 **中等**
3+
这是 LeetCode 上的 **[84. 柱状图中最大的矩形](https://leetcode.cn/problems/largest-rectangle-in-histogram/solution/by-ac_oier-i470/)** ,难度为 **困难**
44

55
Tag : 「单调栈」
66

@@ -12,6 +12,7 @@ Tag : 「单调栈」
1212

1313
示例 1:
1414
![](https://assets.leetcode.com/uploads/2021/01/04/histogram.jpg)
15+
1516
```
1617
输入:heights = [2,1,5,6,2,3]
1718
@@ -21,6 +22,7 @@ Tag : 「单调栈」
2122
```
2223
示例 2:
2324
![](https://assets.leetcode.com/uploads/2021/01/04/histogram-1.jpg)
25+
2426
```
2527
输入: heights = [2,4]
2628

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /