mirror of https://github.com/doocs/leetcode.git
feat: update lc problems (#3674)
This commit is contained in:
parent
ae64403590
commit
7210905ed1
|
|
@ -32,7 +32,7 @@ tags:
|
|||
<pre>
|
||||
<strong>输入:</strong>nums = [[4,10,15,24,26], [0,9,12,20], [5,18,22,30]]
|
||||
<strong>输出:</strong>[20,24]
|
||||
<strong>解释:</strong>
|
||||
<strong>解释:</strong>
|
||||
列表 1:[4, 10, 15, 24, 26],24 在区间 [20,24] 中。
|
||||
列表 2:[0, 9, 12, 20],20 在区间 [20,24] 中。
|
||||
列表 3:[5, 18, 22, 30],22 在区间 [20,24] 中。
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ tags:
|
|||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0900-0999/0931.Minimum%20Falling%20Path%20Sum/images/failing1-grid.jpg" style="height: 500px; width: 499px;" /></p>
|
||||
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0900-0999/0931.Minimum%20Falling%20Path%20Sum/images/1729566253-aneDag-image.png" style="height: 500px; width: 499px;" /></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>matrix = [[2,1,3],[6,5,4],[7,8,9]]
|
||||
|
|
@ -36,7 +36,7 @@ tags:
|
|||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0900-0999/0931.Minimum%20Falling%20Path%20Sum/images/failing2-grid.jpg" style="height: 365px; width: 164px;" /></p>
|
||||
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0900-0999/0931.Minimum%20Falling%20Path%20Sum/images/1729566282-dtXwRd-image.png" style="height: 365px; width: 164px;" /></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>matrix = [[-19,57],[-40,-5]]
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
|
|
@ -8,7 +8,7 @@ tags:
|
|||
|
||||
<!-- problem:start -->
|
||||
|
||||
# [1084. 销售分析III](https://leetcode.cn/problems/sales-analysis-iii)
|
||||
# [1084. 销售分析 III](https://leetcode.cn/problems/sales-analysis-iii)
|
||||
|
||||
[English Version](/solution/1000-1099/1084.Sales%20Analysis%20III/README_EN.md)
|
||||
|
||||
|
|
|
|||
|
|
@ -88,20 +88,21 @@ tags:
|
|||
```python
|
||||
class Solution:
|
||||
def makeConnected(self, n: int, connections: List[List[int]]) -> int:
|
||||
def find(x):
|
||||
def find(x: int) -> int:
|
||||
if p[x] != x:
|
||||
p[x] = find(p[x])
|
||||
return p[x]
|
||||
|
||||
cnt, size = 0, n
|
||||
cnt = 0
|
||||
p = list(range(n))
|
||||
for a, b in connections:
|
||||
if find(a) == find(b):
|
||||
pa, pb = find(a), find(b)
|
||||
if pa == pb:
|
||||
cnt += 1
|
||||
else:
|
||||
p[find(a)] = find(b)
|
||||
size -= 1
|
||||
return -1 if size - 1 > cnt else size - 1
|
||||
p[pa] = pb
|
||||
n -= 1
|
||||
return -1 if n - 1 > cnt else n - 1
|
||||
```
|
||||
|
||||
#### Java
|
||||
|
|
@ -117,12 +118,11 @@ class Solution {
|
|||
}
|
||||
int cnt = 0;
|
||||
for (int[] e : connections) {
|
||||
int a = e[0];
|
||||
int b = e[1];
|
||||
if (find(a) == find(b)) {
|
||||
int pa = find(e[0]), pb = find(e[1]);
|
||||
if (pa == pb) {
|
||||
++cnt;
|
||||
} else {
|
||||
p[find(a)] = find(b);
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
|
|
@ -143,27 +143,26 @@ class Solution {
|
|||
```cpp
|
||||
class Solution {
|
||||
public:
|
||||
vector<int> p;
|
||||
|
||||
int makeConnected(int n, vector<vector<int>>& connections) {
|
||||
p.resize(n);
|
||||
for (int i = 0; i < n; ++i) p[i] = i;
|
||||
vector<int> p(n);
|
||||
iota(p.begin(), p.end(), 0);
|
||||
int cnt = 0;
|
||||
for (auto& e : connections) {
|
||||
int a = e[0], b = e[1];
|
||||
if (find(a) == find(b))
|
||||
function<int(int)> find = [&](int x) -> int {
|
||||
if (p[x] != x) {
|
||||
p[x] = find(p[x]);
|
||||
}
|
||||
return p[x];
|
||||
};
|
||||
for (const auto& c : connections) {
|
||||
int pa = find(c[0]), pb = find(c[1]);
|
||||
if (pa == pb) {
|
||||
++cnt;
|
||||
else {
|
||||
p[find(a)] = find(b);
|
||||
} else {
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
return n - 1 > cnt ? -1 : n - 1;
|
||||
}
|
||||
|
||||
int find(int x) {
|
||||
if (p[x] != x) p[x] = find(p[x]);
|
||||
return p[x];
|
||||
return cnt >= n - 1 ? n - 1 : -1;
|
||||
}
|
||||
};
|
||||
```
|
||||
|
|
@ -185,11 +184,11 @@ func makeConnected(n int, connections [][]int) int {
|
|||
return p[x]
|
||||
}
|
||||
for _, e := range connections {
|
||||
a, b := e[0], e[1]
|
||||
if find(a) == find(b) {
|
||||
pa, pb := find(e[0]), find(e[1])
|
||||
if pa == pb {
|
||||
cnt++
|
||||
} else {
|
||||
p[find(a)] = find(b)
|
||||
p[pa] = pb
|
||||
n--
|
||||
}
|
||||
}
|
||||
|
|
@ -200,6 +199,31 @@ func makeConnected(n int, connections [][]int) int {
|
|||
}
|
||||
```
|
||||
|
||||
#### TypeScript
|
||||
|
||||
```ts
|
||||
function makeConnected(n: number, connections: number[][]): number {
|
||||
const p: number[] = Array.from({ length: n }, (_, i) => i);
|
||||
const find = (x: number): number => {
|
||||
if (p[x] !== x) {
|
||||
p[x] = find(p[x]);
|
||||
}
|
||||
return p[x];
|
||||
};
|
||||
let cnt = 0;
|
||||
for (const [a, b] of connections) {
|
||||
const [pa, pb] = [find(a), find(b)];
|
||||
if (pa === pb) {
|
||||
++cnt;
|
||||
} else {
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
return cnt >= n - 1 ? n - 1 : -1;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
<!-- solution:end -->
|
||||
|
|
|
|||
|
|
@ -79,20 +79,21 @@ tags:
|
|||
```python
|
||||
class Solution:
|
||||
def makeConnected(self, n: int, connections: List[List[int]]) -> int:
|
||||
def find(x):
|
||||
def find(x: int) -> int:
|
||||
if p[x] != x:
|
||||
p[x] = find(p[x])
|
||||
return p[x]
|
||||
|
||||
cnt, size = 0, n
|
||||
cnt = 0
|
||||
p = list(range(n))
|
||||
for a, b in connections:
|
||||
if find(a) == find(b):
|
||||
pa, pb = find(a), find(b)
|
||||
if pa == pb:
|
||||
cnt += 1
|
||||
else:
|
||||
p[find(a)] = find(b)
|
||||
size -= 1
|
||||
return -1 if size - 1 > cnt else size - 1
|
||||
p[pa] = pb
|
||||
n -= 1
|
||||
return -1 if n - 1 > cnt else n - 1
|
||||
```
|
||||
|
||||
#### Java
|
||||
|
|
@ -108,12 +109,11 @@ class Solution {
|
|||
}
|
||||
int cnt = 0;
|
||||
for (int[] e : connections) {
|
||||
int a = e[0];
|
||||
int b = e[1];
|
||||
if (find(a) == find(b)) {
|
||||
int pa = find(e[0]), pb = find(e[1]);
|
||||
if (pa == pb) {
|
||||
++cnt;
|
||||
} else {
|
||||
p[find(a)] = find(b);
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
|
|
@ -134,27 +134,26 @@ class Solution {
|
|||
```cpp
|
||||
class Solution {
|
||||
public:
|
||||
vector<int> p;
|
||||
|
||||
int makeConnected(int n, vector<vector<int>>& connections) {
|
||||
p.resize(n);
|
||||
for (int i = 0; i < n; ++i) p[i] = i;
|
||||
vector<int> p(n);
|
||||
iota(p.begin(), p.end(), 0);
|
||||
int cnt = 0;
|
||||
for (auto& e : connections) {
|
||||
int a = e[0], b = e[1];
|
||||
if (find(a) == find(b))
|
||||
function<int(int)> find = [&](int x) -> int {
|
||||
if (p[x] != x) {
|
||||
p[x] = find(p[x]);
|
||||
}
|
||||
return p[x];
|
||||
};
|
||||
for (const auto& c : connections) {
|
||||
int pa = find(c[0]), pb = find(c[1]);
|
||||
if (pa == pb) {
|
||||
++cnt;
|
||||
else {
|
||||
p[find(a)] = find(b);
|
||||
} else {
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
return n - 1 > cnt ? -1 : n - 1;
|
||||
}
|
||||
|
||||
int find(int x) {
|
||||
if (p[x] != x) p[x] = find(p[x]);
|
||||
return p[x];
|
||||
return cnt >= n - 1 ? n - 1 : -1;
|
||||
}
|
||||
};
|
||||
```
|
||||
|
|
@ -176,11 +175,11 @@ func makeConnected(n int, connections [][]int) int {
|
|||
return p[x]
|
||||
}
|
||||
for _, e := range connections {
|
||||
a, b := e[0], e[1]
|
||||
if find(a) == find(b) {
|
||||
pa, pb := find(e[0]), find(e[1])
|
||||
if pa == pb {
|
||||
cnt++
|
||||
} else {
|
||||
p[find(a)] = find(b)
|
||||
p[pa] = pb
|
||||
n--
|
||||
}
|
||||
}
|
||||
|
|
@ -191,6 +190,31 @@ func makeConnected(n int, connections [][]int) int {
|
|||
}
|
||||
```
|
||||
|
||||
#### TypeScript
|
||||
|
||||
```ts
|
||||
function makeConnected(n: number, connections: number[][]): number {
|
||||
const p: number[] = Array.from({ length: n }, (_, i) => i);
|
||||
const find = (x: number): number => {
|
||||
if (p[x] !== x) {
|
||||
p[x] = find(p[x]);
|
||||
}
|
||||
return p[x];
|
||||
};
|
||||
let cnt = 0;
|
||||
for (const [a, b] of connections) {
|
||||
const [pa, pb] = [find(a), find(b)];
|
||||
if (pa === pb) {
|
||||
++cnt;
|
||||
} else {
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
return cnt >= n - 1 ? n - 1 : -1;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
<!-- solution:end -->
|
||||
|
|
|
|||
|
|
@ -1,25 +1,24 @@
|
|||
class Solution {
|
||||
public:
|
||||
vector<int> p;
|
||||
|
||||
int makeConnected(int n, vector<vector<int>>& connections) {
|
||||
p.resize(n);
|
||||
for (int i = 0; i < n; ++i) p[i] = i;
|
||||
vector<int> p(n);
|
||||
iota(p.begin(), p.end(), 0);
|
||||
int cnt = 0;
|
||||
for (auto& e : connections) {
|
||||
int a = e[0], b = e[1];
|
||||
if (find(a) == find(b))
|
||||
function<int(int)> find = [&](int x) -> int {
|
||||
if (p[x] != x) {
|
||||
p[x] = find(p[x]);
|
||||
}
|
||||
return p[x];
|
||||
};
|
||||
for (const auto& c : connections) {
|
||||
int pa = find(c[0]), pb = find(c[1]);
|
||||
if (pa == pb) {
|
||||
++cnt;
|
||||
else {
|
||||
p[find(a)] = find(b);
|
||||
} else {
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
return n - 1 > cnt ? -1 : n - 1;
|
||||
return cnt >= n - 1 ? n - 1 : -1;
|
||||
}
|
||||
|
||||
int find(int x) {
|
||||
if (p[x] != x) p[x] = find(p[x]);
|
||||
return p[x];
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ func makeConnected(n int, connections [][]int) int {
|
|||
return p[x]
|
||||
}
|
||||
for _, e := range connections {
|
||||
a, b := e[0], e[1]
|
||||
if find(a) == find(b) {
|
||||
pa, pb := find(e[0]), find(e[1])
|
||||
if pa == pb {
|
||||
cnt++
|
||||
} else {
|
||||
p[find(a)] = find(b)
|
||||
p[pa] = pb
|
||||
n--
|
||||
}
|
||||
}
|
||||
|
|
@ -24,4 +24,4 @@ func makeConnected(n int, connections [][]int) int {
|
|||
return -1
|
||||
}
|
||||
return n - 1
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,12 +8,11 @@ class Solution {
|
|||
}
|
||||
int cnt = 0;
|
||||
for (int[] e : connections) {
|
||||
int a = e[0];
|
||||
int b = e[1];
|
||||
if (find(a) == find(b)) {
|
||||
int pa = find(e[0]), pb = find(e[1]);
|
||||
if (pa == pb) {
|
||||
++cnt;
|
||||
} else {
|
||||
p[find(a)] = find(b);
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
|
|
@ -26,4 +25,4 @@ class Solution {
|
|||
}
|
||||
return p[x];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
class Solution:
|
||||
def makeConnected(self, n: int, connections: List[List[int]]) -> int:
|
||||
def find(x):
|
||||
def find(x: int) -> int:
|
||||
if p[x] != x:
|
||||
p[x] = find(p[x])
|
||||
return p[x]
|
||||
|
||||
cnt, size = 0, n
|
||||
cnt = 0
|
||||
p = list(range(n))
|
||||
for a, b in connections:
|
||||
if find(a) == find(b):
|
||||
pa, pb = find(a), find(b)
|
||||
if pa == pb:
|
||||
cnt += 1
|
||||
else:
|
||||
p[find(a)] = find(b)
|
||||
size -= 1
|
||||
return -1 if size - 1 > cnt else size - 1
|
||||
p[pa] = pb
|
||||
n -= 1
|
||||
return -1 if n - 1 > cnt else n - 1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
function makeConnected(n: number, connections: number[][]): number {
|
||||
const p: number[] = Array.from({ length: n }, (_, i) => i);
|
||||
const find = (x: number): number => {
|
||||
if (p[x] !== x) {
|
||||
p[x] = find(p[x]);
|
||||
}
|
||||
return p[x];
|
||||
};
|
||||
let cnt = 0;
|
||||
for (const [a, b] of connections) {
|
||||
const [pa, pb] = [find(a), find(b)];
|
||||
if (pa === pb) {
|
||||
++cnt;
|
||||
} else {
|
||||
p[pa] = pb;
|
||||
--n;
|
||||
}
|
||||
}
|
||||
return cnt >= n - 1 ? n - 1 : -1;
|
||||
}
|
||||
|
|
@ -30,7 +30,7 @@ tags:
|
|||
(stock_name, operation_day) 是这张表的主键(具有唯一值的列的组合)
|
||||
operation 列使用的是一种枚举类型,包括:('Sell','Buy')
|
||||
此表的每一行代表了名为 stock_name 的某支股票在 operation_day 这一天的操作价格。
|
||||
此表可以保证,股票的每个“卖出”操作在前一天都有相应的“买入”操作。并且,股票的每个“买入”操作在即将到来的一天都有相应的“卖出”操作。
|
||||
此表可以保证,股票的每个“卖出”操作在前某一天都有相应的“买入”操作。并且,股票的每个“买入”操作在即将到来的某一天都有相应的“卖出”操作。
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ tags:
|
|||
<pre>
|
||||
<strong>Input:</strong> nums = [8], k = 100000
|
||||
<strong>Output:</strong> [-1]
|
||||
<strong>Explanation:</strong>
|
||||
<strong>Explanation:</strong>
|
||||
- avg[0] is -1 because there are less than k elements before and after index 0.
|
||||
</pre>
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ tags:
|
|||
- 乘坐常规路线从车站 0 到车站 1,费用是 1。
|
||||
- 乘坐特快路线从车站 1 到车站 2,费用是 8 + 2 = 10。
|
||||
- 乘坐特快路线从车站 2 到车站 3,费用是 3。
|
||||
- 乘坐特快路线从车站 3 到车站 4,费用是 5。
|
||||
- 乘坐常规路线从车站 3 到车站 4,费用是 5。
|
||||
总费用是 1 + 10 + 3 + 5 + 19。
|
||||
注意到达其他车站的最少费用方法可以选择不同的路线。
|
||||
</pre>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ tags:
|
|||
- 数组
|
||||
- 二分查找
|
||||
- 排序
|
||||
- 滑动窗口
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ tags:
|
|||
- Array
|
||||
- Binary Search
|
||||
- Sorting
|
||||
- Sliding Window
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ comments: true
|
|||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3329.Count%20Substrings%20With%20K-Frequency%20Characters%20II/README.md
|
||||
tags:
|
||||
- 哈希表
|
||||
- 字符串
|
||||
- 滑动窗口
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ comments: true
|
|||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3329.Count%20Substrings%20With%20K-Frequency%20Characters%20II/README_EN.md
|
||||
tags:
|
||||
- Hash Table
|
||||
- String
|
||||
- Sliding Window
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,10 @@ comments: true
|
|||
|
||||
## 往期竞赛
|
||||
|
||||
#### 第 420 场周赛(2024-10-20 10:30, 90 分钟) 参赛人数 2995
|
||||
#### 第 142 场双周赛(2024-10-26 22:30, 90 分钟) 参赛人数 1900
|
||||
|
||||
|
||||
#### 第 420 场周赛(2024-10-20 10:30, 90 分钟) 参赛人数 2996
|
||||
|
||||
- [3324. 出现在屏幕上的字符串序列](/solution/3300-3399/3324.Find%20the%20Sequence%20of%20Strings%20Appeared%20on%20the%20Screen/README.md)
|
||||
- [3325. 字符至少出现 K 次的子字符串 I](/solution/3300-3399/3325.Count%20Substrings%20With%20K-Frequency%20Characters%20I/README.md)
|
||||
|
|
@ -2338,7 +2341,6 @@ comments: true
|
|||
|
||||
#### 第 200 场周赛(2020-08-02 10:30, 90 分钟) 参赛人数 5476
|
||||
|
||||
- [1534. 统计好三元组](/solution/1500-1599/1534.Count%20Good%20Triplets/README.md)
|
||||
- [1535. 找出数组游戏的赢家](/solution/1500-1599/1535.Find%20the%20Winner%20of%20an%20Array%20Game/README.md)
|
||||
- [1536. 排布二进制网格的最少交换次数](/solution/1500-1599/1536.Minimum%20Swaps%20to%20Arrange%20a%20Binary%20Grid/README.md)
|
||||
- [1537. 最大得分](/solution/1500-1599/1537.Get%20the%20Maximum%20Score/README.md)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ If you want to estimate your score changes after the contest ends, you can visit
|
|||
|
||||
## Past Contests
|
||||
|
||||
#### Biweekly Contest 142
|
||||
|
||||
|
||||
#### Weekly Contest 420
|
||||
|
||||
- [3324. Find the Sequence of Strings Appeared on the Screen](/solution/3300-3399/3324.Find%20the%20Sequence%20of%20Strings%20Appeared%20on%20the%20Screen/README_EN.md)
|
||||
|
|
@ -2341,7 +2344,6 @@ If you want to estimate your score changes after the contest ends, you can visit
|
|||
|
||||
#### Weekly Contest 200
|
||||
|
||||
- [1534. Count Good Triplets](/solution/1500-1599/1534.Count%20Good%20Triplets/README_EN.md)
|
||||
- [1535. Find the Winner of an Array Game](/solution/1500-1599/1535.Find%20the%20Winner%20of%20an%20Array%20Game/README_EN.md)
|
||||
- [1536. Minimum Swaps to Arrange a Binary Grid](/solution/1500-1599/1536.Minimum%20Swaps%20to%20Arrange%20a%20Binary%20Grid/README_EN.md)
|
||||
- [1537. Get the Maximum Score](/solution/1500-1599/1537.Get%20the%20Maximum%20Score/README_EN.md)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
| 1077 | [项目员工 III](/solution/1000-1099/1077.Project%20Employees%20III/README.md) | `数据库` | 中等 | 🔒 |
|
||||
| 1082 | [销售分析 I ](/solution/1000-1099/1082.Sales%20Analysis%20I/README.md) | `数据库` | 简单 | 🔒 |
|
||||
| 1083 | [销售分析 II](/solution/1000-1099/1083.Sales%20Analysis%20II/README.md) | `数据库` | 简单 | 🔒 |
|
||||
| 1084 | [销售分析III](/solution/1000-1099/1084.Sales%20Analysis%20III/README.md) | `数据库` | 简单 | |
|
||||
| 1084 | [销售分析 III](/solution/1000-1099/1084.Sales%20Analysis%20III/README.md) | `数据库` | 简单 | |
|
||||
| 1097 | [游戏玩法分析 V](/solution/1000-1099/1097.Game%20Play%20Analysis%20V/README.md) | `数据库` | 困难 | 🔒 |
|
||||
| 1098 | [小众书籍](/solution/1000-1099/1098.Unpopular%20Books/README.md) | `数据库` | 中等 | 🔒 |
|
||||
| 1107 | [每日新用户统计](/solution/1100-1199/1107.New%20Users%20Daily%20Count/README.md) | `数据库` | 中等 | 🔒 |
|
||||
|
|
|
|||
|
|
@ -1094,7 +1094,7 @@
|
|||
| 1081 | [不同字符的最小子序列](/solution/1000-1099/1081.Smallest%20Subsequence%20of%20Distinct%20Characters/README.md) | `栈`,`贪心`,`字符串`,`单调栈` | 中等 | 第 140 场周赛 |
|
||||
| 1082 | [销售分析 I ](/solution/1000-1099/1082.Sales%20Analysis%20I/README.md) | `数据库` | 简单 | 🔒 |
|
||||
| 1083 | [销售分析 II](/solution/1000-1099/1083.Sales%20Analysis%20II/README.md) | `数据库` | 简单 | 🔒 |
|
||||
| 1084 | [销售分析III](/solution/1000-1099/1084.Sales%20Analysis%20III/README.md) | `数据库` | 简单 | |
|
||||
| 1084 | [销售分析 III](/solution/1000-1099/1084.Sales%20Analysis%20III/README.md) | `数据库` | 简单 | |
|
||||
| 1085 | [最小元素各数位之和](/solution/1000-1099/1085.Sum%20of%20Digits%20in%20the%20Minimum%20Number/README.md) | `数组`,`数学` | 简单 | 第 2 场双周赛 |
|
||||
| 1086 | [前五科的均分](/solution/1000-1099/1086.High%20Five/README.md) | `数组`,`哈希表`,`排序`,`堆(优先队列)` | 简单 | 第 2 场双周赛 |
|
||||
| 1087 | [花括号展开](/solution/1000-1099/1087.Brace%20Expansion/README.md) | `广度优先搜索`,`字符串`,`回溯` | 中等 | 第 2 场双周赛 |
|
||||
|
|
@ -1544,7 +1544,6 @@
|
|||
| 1531 | [压缩字符串 II](/solution/1500-1599/1531.String%20Compression%20II/README.md) | `字符串`,`动态规划` | 困难 | 第 199 场周赛 |
|
||||
| 1532 | [最近的三笔订单](/solution/1500-1599/1532.The%20Most%20Recent%20Three%20Orders/README.md) | `数据库` | 中等 | 🔒 |
|
||||
| 1533 | [找到最大整数的索引](/solution/1500-1599/1533.Find%20the%20Index%20of%20the%20Large%20Integer/README.md) | `数组`,`二分查找`,`交互` | 中等 | 🔒 |
|
||||
| 1534 | [统计好三元组](/solution/1500-1599/1534.Count%20Good%20Triplets/README.md) | `数组`,`枚举` | 简单 | 第 200 场周赛 |
|
||||
| 1535 | [找出数组游戏的赢家](/solution/1500-1599/1535.Find%20the%20Winner%20of%20an%20Array%20Game/README.md) | `数组`,`模拟` | 中等 | 第 200 场周赛 |
|
||||
| 1536 | [排布二进制网格的最少交换次数](/solution/1500-1599/1536.Minimum%20Swaps%20to%20Arrange%20a%20Binary%20Grid/README.md) | `贪心`,`数组`,`矩阵` | 中等 | 第 200 场周赛 |
|
||||
| 1537 | [最大得分](/solution/1500-1599/1537.Get%20the%20Maximum%20Score/README.md) | `贪心`,`数组`,`双指针`,`动态规划` | 困难 | 第 200 场周赛 |
|
||||
|
|
@ -3333,13 +3332,13 @@
|
|||
| 3320 | [统计能获胜的出招序列数](/solution/3300-3399/3320.Count%20The%20Number%20of%20Winning%20Sequences/README.md) | `字符串`,`动态规划` | 困难 | 第 419 场周赛 |
|
||||
| 3321 | [计算子数组的 x-sum II](/solution/3300-3399/3321.Find%20X-Sum%20of%20All%20K-Long%20Subarrays%20II/README.md) | `数组`,`哈希表`,`滑动窗口`,`堆(优先队列)` | 困难 | 第 419 场周赛 |
|
||||
| 3322 | [英超积分榜排名 III](/solution/3300-3399/3322.Premier%20League%20Table%20Ranking%20III/README.md) | `数据库` | 中等 | 🔒 |
|
||||
| 3323 | [通过插入区间最小化连通组](/solution/3300-3399/3323.Minimize%20Connected%20Groups%20by%20Inserting%20Interval/README.md) | `数组`,`二分查找`,`排序` | 中等 | 🔒 |
|
||||
| 3323 | [通过插入区间最小化连通组](/solution/3300-3399/3323.Minimize%20Connected%20Groups%20by%20Inserting%20Interval/README.md) | `数组`,`二分查找`,`排序`,`滑动窗口` | 中等 | 🔒 |
|
||||
| 3324 | [出现在屏幕上的字符串序列](/solution/3300-3399/3324.Find%20the%20Sequence%20of%20Strings%20Appeared%20on%20the%20Screen/README.md) | `字符串`,`模拟` | 中等 | 第 420 场周赛 |
|
||||
| 3325 | [字符至少出现 K 次的子字符串 I](/solution/3300-3399/3325.Count%20Substrings%20With%20K-Frequency%20Characters%20I/README.md) | `哈希表`,`字符串`,`滑动窗口` | 中等 | 第 420 场周赛 |
|
||||
| 3326 | [使数组非递减的最少除法操作次数](/solution/3300-3399/3326.Minimum%20Division%20Operations%20to%20Make%20Array%20Non%20Decreasing/README.md) | `贪心`,`数组`,`数学`,`数论` | 中等 | 第 420 场周赛 |
|
||||
| 3327 | [判断 DFS 字符串是否是回文串](/solution/3300-3399/3327.Check%20if%20DFS%20Strings%20Are%20Palindromes/README.md) | `树`,`深度优先搜索`,`数组`,`哈希表`,`字符串`,`哈希函数` | 困难 | 第 420 场周赛 |
|
||||
| 3328 | [查找每个州的城市 II](/solution/3300-3399/3328.Find%20Cities%20in%20Each%20State%20II/README.md) | `数据库` | 中等 | 🔒 |
|
||||
| 3329 | [字符至少出现 K 次的子字符串 II](/solution/3300-3399/3329.Count%20Substrings%20With%20K-Frequency%20Characters%20II/README.md) | `滑动窗口` | 困难 | 🔒 |
|
||||
| 3329 | [字符至少出现 K 次的子字符串 II](/solution/3300-3399/3329.Count%20Substrings%20With%20K-Frequency%20Characters%20II/README.md) | `哈希表`,`字符串`,`滑动窗口` | 困难 | 🔒 |
|
||||
|
||||
## 版权
|
||||
|
||||
|
|
|
|||
|
|
@ -1542,7 +1542,6 @@ Press <kbd>Control</kbd> + <kbd>F</kbd>(or <kbd>Command</kbd> + <kbd>F</kbd> on
|
|||
| 1531 | [String Compression II](/solution/1500-1599/1531.String%20Compression%20II/README_EN.md) | `String`,`Dynamic Programming` | Hard | Weekly Contest 199 |
|
||||
| 1532 | [The Most Recent Three Orders](/solution/1500-1599/1532.The%20Most%20Recent%20Three%20Orders/README_EN.md) | `Database` | Medium | 🔒 |
|
||||
| 1533 | [Find the Index of the Large Integer](/solution/1500-1599/1533.Find%20the%20Index%20of%20the%20Large%20Integer/README_EN.md) | `Array`,`Binary Search`,`Interactive` | Medium | 🔒 |
|
||||
| 1534 | [Count Good Triplets](/solution/1500-1599/1534.Count%20Good%20Triplets/README_EN.md) | `Array`,`Enumeration` | Easy | Weekly Contest 200 |
|
||||
| 1535 | [Find the Winner of an Array Game](/solution/1500-1599/1535.Find%20the%20Winner%20of%20an%20Array%20Game/README_EN.md) | `Array`,`Simulation` | Medium | Weekly Contest 200 |
|
||||
| 1536 | [Minimum Swaps to Arrange a Binary Grid](/solution/1500-1599/1536.Minimum%20Swaps%20to%20Arrange%20a%20Binary%20Grid/README_EN.md) | `Greedy`,`Array`,`Matrix` | Medium | Weekly Contest 200 |
|
||||
| 1537 | [Get the Maximum Score](/solution/1500-1599/1537.Get%20the%20Maximum%20Score/README_EN.md) | `Greedy`,`Array`,`Two Pointers`,`Dynamic Programming` | Hard | Weekly Contest 200 |
|
||||
|
|
@ -3331,13 +3330,13 @@ Press <kbd>Control</kbd> + <kbd>F</kbd>(or <kbd>Command</kbd> + <kbd>F</kbd> on
|
|||
| 3320 | [Count The Number of Winning Sequences](/solution/3300-3399/3320.Count%20The%20Number%20of%20Winning%20Sequences/README_EN.md) | `String`,`Dynamic Programming` | Hard | Weekly Contest 419 |
|
||||
| 3321 | [Find X-Sum of All K-Long Subarrays II](/solution/3300-3399/3321.Find%20X-Sum%20of%20All%20K-Long%20Subarrays%20II/README_EN.md) | `Array`,`Hash Table`,`Sliding Window`,`Heap (Priority Queue)` | Hard | Weekly Contest 419 |
|
||||
| 3322 | [Premier League Table Ranking III](/solution/3300-3399/3322.Premier%20League%20Table%20Ranking%20III/README_EN.md) | `Database` | Medium | 🔒 |
|
||||
| 3323 | [Minimize Connected Groups by Inserting Interval](/solution/3300-3399/3323.Minimize%20Connected%20Groups%20by%20Inserting%20Interval/README_EN.md) | `Array`,`Binary Search`,`Sorting` | Medium | 🔒 |
|
||||
| 3323 | [Minimize Connected Groups by Inserting Interval](/solution/3300-3399/3323.Minimize%20Connected%20Groups%20by%20Inserting%20Interval/README_EN.md) | `Array`,`Binary Search`,`Sorting`,`Sliding Window` | Medium | 🔒 |
|
||||
| 3324 | [Find the Sequence of Strings Appeared on the Screen](/solution/3300-3399/3324.Find%20the%20Sequence%20of%20Strings%20Appeared%20on%20the%20Screen/README_EN.md) | `String`,`Simulation` | Medium | Weekly Contest 420 |
|
||||
| 3325 | [Count Substrings With K-Frequency Characters I](/solution/3300-3399/3325.Count%20Substrings%20With%20K-Frequency%20Characters%20I/README_EN.md) | `Hash Table`,`String`,`Sliding Window` | Medium | Weekly Contest 420 |
|
||||
| 3326 | [Minimum Division Operations to Make Array Non Decreasing](/solution/3300-3399/3326.Minimum%20Division%20Operations%20to%20Make%20Array%20Non%20Decreasing/README_EN.md) | `Greedy`,`Array`,`Math`,`Number Theory` | Medium | Weekly Contest 420 |
|
||||
| 3327 | [Check if DFS Strings Are Palindromes](/solution/3300-3399/3327.Check%20if%20DFS%20Strings%20Are%20Palindromes/README_EN.md) | `Tree`,`Depth-First Search`,`Array`,`Hash Table`,`String`,`Hash Function` | Hard | Weekly Contest 420 |
|
||||
| 3328 | [Find Cities in Each State II](/solution/3300-3399/3328.Find%20Cities%20in%20Each%20State%20II/README_EN.md) | `Database` | Medium | 🔒 |
|
||||
| 3329 | [Count Substrings With K-Frequency Characters II](/solution/3300-3399/3329.Count%20Substrings%20With%20K-Frequency%20Characters%20II/README_EN.md) | `Sliding Window` | Hard | 🔒 |
|
||||
| 3329 | [Count Substrings With K-Frequency Characters II](/solution/3300-3399/3329.Count%20Substrings%20With%20K-Frequency%20Characters%20II/README_EN.md) | `Hash Table`,`String`,`Sliding Window` | Hard | 🔒 |
|
||||
|
||||
## Copyright
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue