From b45a22206b0c3fe86c9b67362e9c23236fda036d Mon Sep 17 00:00:00 2001 From: Yang Libin Date: Sun, 15 Oct 2023 01:13:54 +0000 Subject: [PATCH] chore: update lc problems --- .../2899.Last Visited Integers/README.md | 93 +++++++++++++++ .../2899.Last Visited Integers/README_EN.md | 83 ++++++++++++++ .../README.md | 97 ++++++++++++++++ .../README_EN.md | 88 ++++++++++++++ .../README.md | 107 ++++++++++++++++++ .../README_EN.md | 97 ++++++++++++++++ .../README.md | 100 ++++++++++++++++ .../README_EN.md | 90 +++++++++++++++ solution/CONTEST_README.md | 7 ++ solution/CONTEST_README_EN.md | 7 ++ solution/DATABASE_README.md | 2 +- solution/DATABASE_README_EN.md | 2 +- solution/JAVASCRIPT_README.md | 2 +- solution/JAVASCRIPT_README_EN.md | 2 +- solution/README.md | 34 +++--- solution/README_EN.md | 34 +++--- solution/database-summary.md | 2 +- solution/summary.md | 8 +- solution/summary_en.md | 6 + 19 files changed, 825 insertions(+), 36 deletions(-) create mode 100644 solution/2800-2899/2899.Last Visited Integers/README.md create mode 100644 solution/2800-2899/2899.Last Visited Integers/README_EN.md create mode 100644 solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README.md create mode 100644 solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README_EN.md create mode 100644 solution/2900-2999/2901.Longest Unequal Adjacent Groups Subsequence II/README.md create mode 100644 solution/2900-2999/2901.Longest Unequal Adjacent Groups Subsequence II/README_EN.md create mode 100644 solution/2900-2999/2902.Count of Sub-Multisets With Bounded Sum/README.md create mode 100644 solution/2900-2999/2902.Count of Sub-Multisets With Bounded Sum/README_EN.md diff --git a/solution/2800-2899/2899.Last Visited Integers/README.md b/solution/2800-2899/2899.Last Visited Integers/README.md new file mode 100644 index 0000000000000..3579ab8e2ad7b --- /dev/null +++ b/solution/2800-2899/2899.Last Visited Integers/README.md @@ -0,0 +1,93 @@ +# [2899. 上一个遍历的整数](https://leetcode.cn/problems/last-visited-integers) + +[English Version](/solution/2800-2899/2899.Last%20Visited%20Integers/README_EN.md) + +## 题目描述 + + + +

给你一个下标从 0 开始的字符串数组 words ,其中 words[i] 要么是一个字符串形式的正整数,要么是字符串 "prev" 。

+ +

我们从数组的开头开始遍历,对于 words 中的每个 "prev" 字符串,找到 words 中的 上一个遍历的整数 ,定义如下:

+ + + +

请你返回一个整数数组,包含所有上一个遍历的整数。

+ +

 

+ +

示例 1:

+ +
+输入:words = ["1","2","prev","prev","prev"]
+输出:[2,1,-1]
+解释:
+对于下标为 2 处的 "prev" ,上一个遍历的整数是 2 ,因为连续 "prev" 数目为 1 ,同时在数组 reverse_nums 中,第一个元素是 2 。
+对于下标为 3 处的 "prev" ,上一个遍历的整数是 1 ,因为连续 "prev" 数目为 2 ,同时在数组 reverse_nums 中,第二个元素是 1 。
+对于下标为 4 处的 "prev" ,上一个遍历的整数是 -1 ,因为连续 "prev" 数目为 3 ,但总共只遍历过 2 个整数。
+
+ +

示例 2:

+ +
+输入:words = ["1","prev","2","prev","prev"]
+输出:[1,2,1]
+解释:
+对于下标为 1 处的 "prev" ,上一个遍历的整数是 1 。
+对于下标为 3 处的 "prev" ,上一个遍历的整数是 2 。
+对于下标为 4 处的 "prev" ,上一个遍历的整数是 1 ,因为连续 "prev" 数目为 2 ,同时在数组 reverse_nums 中,第二个元素是 1 。
+
+ +

 

+ +

提示:

+ + + +## 解法 + + + + + +### **Python3** + + + +```python + +``` + +### **Java** + + + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2800-2899/2899.Last Visited Integers/README_EN.md b/solution/2800-2899/2899.Last Visited Integers/README_EN.md new file mode 100644 index 0000000000000..7644c3562aa5e --- /dev/null +++ b/solution/2800-2899/2899.Last Visited Integers/README_EN.md @@ -0,0 +1,83 @@ +# [2899. Last Visited Integers](https://leetcode.com/problems/last-visited-integers) + +[中文文档](/solution/2800-2899/2899.Last%20Visited%20Integers/README.md) + +## Description + +

Given a 0-indexed array of strings words where words[i] is either a positive integer represented as a string or the string "prev".

+ +

Start iterating from the beginning of the array; for every "prev" string seen in words, find the last visited integer in words which is defined as follows:

+ + + +

Return an integer array containing the last visited integers.

+ +

 

+

Example 1:

+ +
+Input: words = ["1","2","prev","prev","prev"]
+Output: [2,1,-1]
+Explanation: 
+For "prev" at index = 2, last visited integer will be 2 as here the number of consecutive "prev" strings is 1, and in the array reverse_nums, 2 will be the first element.
+For "prev" at index = 3, last visited integer will be 1 as there are a total of two consecutive "prev" strings including this "prev" which are visited, and 1 is the second last visited integer.
+For "prev" at index = 4, last visited integer will be -1 as there are a total of three consecutive "prev" strings including this "prev" which are visited, but the total number of integers visited is two.
+
+ +

Example 2:

+ +
+Input: words = ["1","prev","2","prev","prev"]
+Output: [1,2,1]
+Explanation:
+For "prev" at index = 1, last visited integer will be 1.
+For "prev" at index = 3, last visited integer will be 2.
+For "prev" at index = 4, last visited integer will be 1 as there are a total of two consecutive "prev" strings including this "prev" which are visited, and 1 is the second last visited integer.
+
+ +

 

+

Constraints:

+ + + +## Solutions + + + +### **Python3** + +```python + +``` + +### **Java** + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README.md b/solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README.md new file mode 100644 index 0000000000000..480c3633b7b44 --- /dev/null +++ b/solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README.md @@ -0,0 +1,97 @@ +# [2900. 最长相邻不相等子序列 I](https://leetcode.cn/problems/longest-unequal-adjacent-groups-subsequence-i) + +[English Version](/solution/2900-2999/2900.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20I/README_EN.md) + +## 题目描述 + + + +

给你一个整数 n 和一个下标从 0 开始的字符串数组 words ,和一个下标从 0 开始的 二进制 数组 groups ,两个数组长度都是 n 。

+ +

你需要从下标 [0, 1, ..., n - 1] 中选出一个 最长子序列 ,将这个子序列记作长度为 k 的 [i0, i1, ..., ik - 1] ,对于所有满足 0 < j + 1 < k 的 j 都有 groups[ij] != groups[ij + 1] 。

+ +

请你返回一个字符串数组,它是下标子序列 依次 对应 words 数组中的字符串连接形成的字符串数组。如果有多个答案,返回任意一个。

+ +

子序列 指的是从原数组中删掉一些(也可能一个也不删掉)元素,剩余元素不改变相对位置得到的新的数组。

+ +

注意:words 中的字符串长度可能 不相等 。

+ +

 

+ +

示例 1:

+ +
+输入:n = 3, words = ["e","a","b"], groups = [0,0,1]
+输出:["e","b"]
+解释:一个可行的子序列是 [0,2] ,因为 groups[0] != groups[2] 。
+所以一个可行的答案是 [words[0],words[2]] = ["e","b"] 。
+另一个可行的子序列是 [1,2] ,因为 groups[1] != groups[2] 。
+得到答案为 [words[1],words[2]] = ["a","b"] 。
+这也是一个可行的答案。
+符合题意的最长子序列的长度为 2 。
+ +

示例 2:

+ +
+输入:n = 4, words = ["a","b","c","d"], groups = [1,0,1,1]
+输出:["a","b","c"]
+解释:一个可行的子序列为 [0,1,2] 因为 groups[0] != groups[1] 且 groups[1] != groups[2] 。
+所以一个可行的答案是 [words[0],words[1],words[2]] = ["a","b","c"] 。
+另一个可行的子序列为 [0,1,3] 因为 groups[0] != groups[1] 且 groups[1] != groups[3] 。
+得到答案为 [words[0],words[1],words[3]] = ["a","b","d"] 。
+这也是一个可行的答案。
+符合题意的最长子序列的长度为 3 。
+ +

 

+ +

提示:

+ + + +## 解法 + + + + + +### **Python3** + + + +```python + +``` + +### **Java** + + + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README_EN.md b/solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README_EN.md new file mode 100644 index 0000000000000..9c3e11ec73e4c --- /dev/null +++ b/solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README_EN.md @@ -0,0 +1,88 @@ +# [2900. Longest Unequal Adjacent Groups Subsequence I](https://leetcode.com/problems/longest-unequal-adjacent-groups-subsequence-i) + +[中文文档](/solution/2900-2999/2900.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20I/README.md) + +## Description + +

You are given an integer n, a 0-indexed string array words, and a 0-indexed binary array groups, both arrays having length n.

+ +

You need to select the longest subsequence from an array of indices [0, 1, ..., n - 1], such that for the subsequence denoted as [i0, i1, ..., ik - 1] having length k, groups[ij] != groups[ij + 1], for each j where 0 < j + 1 < k.

+ +

Return a string array containing the words corresponding to the indices (in order) in the selected subsequence. If there are multiple answers, return any of them.

+ +

A subsequence of an array is a new array that is formed from the original array by deleting some (possibly none) of the elements without disturbing the relative positions of the remaining elements.

+ +

Note: strings in words may be unequal in length.

+ +

 

+

Example 1:

+ +
+Input: n = 3, words = ["e","a","b"], groups = [0,0,1]
+Output: ["e","b"]
+Explanation: A subsequence that can be selected is [0,2] because groups[0] != groups[2].
+So, a valid answer is [words[0],words[2]] = ["e","b"].
+Another subsequence that can be selected is [1,2] because groups[1] != groups[2].
+This results in [words[1],words[2]] = ["a","b"].
+It is also a valid answer.
+It can be shown that the length of the longest subsequence of indices that satisfies the condition is 2.
+ +

Example 2:

+ +
+Input: n = 4, words = ["a","b","c","d"], groups = [1,0,1,1]
+Output: ["a","b","c"]
+Explanation: A subsequence that can be selected is [0,1,2] because groups[0] != groups[1] and groups[1] != groups[2].
+So, a valid answer is [words[0],words[1],words[2]] = ["a","b","c"].
+Another subsequence that can be selected is [0,1,3] because groups[0] != groups[1] and groups[1] != groups[3].
+This results in [words[0],words[1],words[3]] = ["a","b","d"].
+It is also a valid answer.
+It can be shown that the length of the longest subsequence of indices that satisfies the condition is 3.
+
+ +

 

+

Constraints:

+ + + +## Solutions + + + +### **Python3** + +```python + +``` + +### **Java** + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2900-2999/2901.Longest Unequal Adjacent Groups Subsequence II/README.md b/solution/2900-2999/2901.Longest Unequal Adjacent Groups Subsequence II/README.md new file mode 100644 index 0000000000000..cc37566766dd2 --- /dev/null +++ b/solution/2900-2999/2901.Longest Unequal Adjacent Groups Subsequence II/README.md @@ -0,0 +1,107 @@ +# [2901. 最长相邻不相等子序列 II](https://leetcode.cn/problems/longest-unequal-adjacent-groups-subsequence-ii) + +[English Version](/solution/2900-2999/2901.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20II/README_EN.md) + +## 题目描述 + + + +

给你一个整数 n 和一个下标从 0 开始的字符串数组 words ,和一个下标从 0 开始的 二进制 数组 groups ,两个数组长度都是 n 。

+ +

两个长度相等字符串的 汉明距离 定义为对应位置字符 不同 的数目。

+ +

你需要从下标 [0, 1, ..., n - 1] 中选出一个 最长子序列 ,将这个子序列记作长度为 k 的 [i0, i1, ..., ik - 1] ,它需要满足以下条件:

+ + + +

请你返回一个字符串数组,它是下标子序列 依次 对应 words 数组中的字符串连接形成的字符串数组。如果有多个答案,返回任意一个。

+ +

子序列 指的是从原数组中删掉一些(也可能一个也不删掉)元素,剩余元素不改变相对位置得到的新的数组。

+ +

注意:words 中的字符串长度可能 不相等 。

+ +

 

+ +

示例 1:

+ +
+输入:n = 3, words = ["bab","dab","cab"], groups = [1,2,2]
+输出:["bab","cab"]
+解释:一个可行的子序列是 [0,2] 。
+- groups[0] != groups[2]
+- words[0].length == words[2].length 且它们之间的汉明距离为 1 。
+所以一个可行的答案是 [words[0],words[2]] = ["bab","cab"] 。
+另一个可行的子序列是 [0,1] 。
+- groups[0] != groups[1]
+- words[0].length = words[1].length 且它们之间的汉明距离为 1 。
+所以另一个可行的答案是 [words[0],words[1]] = ["bab","dab"] 。
+符合题意的最长子序列的长度为 2 。
+ +

示例 2:

+ +
+输入:n = 4, words = ["a","b","c","d"], groups = [1,2,3,4]
+输出:["a","b","c","d"]
+解释:我们选择子序列 [0,1,2,3] 。
+它同时满足两个条件。
+所以答案为 [words[0],words[1],words[2],words[3]] = ["a","b","c","d"] 。
+它是所有下标子序列里最长且满足所有条件的。
+所以它是唯一的答案。
+
+ +

 

+ +

提示:

+ + + +## 解法 + + + + + +### **Python3** + + + +```python + +``` + +### **Java** + + + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2900-2999/2901.Longest Unequal Adjacent Groups Subsequence II/README_EN.md b/solution/2900-2999/2901.Longest Unequal Adjacent Groups Subsequence II/README_EN.md new file mode 100644 index 0000000000000..1c7a144327668 --- /dev/null +++ b/solution/2900-2999/2901.Longest Unequal Adjacent Groups Subsequence II/README_EN.md @@ -0,0 +1,97 @@ +# [2901. Longest Unequal Adjacent Groups Subsequence II](https://leetcode.com/problems/longest-unequal-adjacent-groups-subsequence-ii) + +[中文文档](/solution/2900-2999/2901.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20II/README.md) + +## Description + +

You are given an integer n, a 0-indexed string array words, and a 0-indexed array groups, both arrays having length n.

+ +

The hamming distance between two strings of equal length is the number of positions at which the corresponding characters are different.

+ +

You need to select the longest subsequence from an array of indices [0, 1, ..., n - 1], such that for the subsequence denoted as [i0, i1, ..., ik - 1] having length k, the following holds:

+ + + +

Return a string array containing the words corresponding to the indices (in order) in the selected subsequence. If there are multiple answers, return any of them.

+ +

A subsequence of an array is a new array that is formed from the original array by deleting some (possibly none) of the elements without disturbing the relative positions of the remaining elements.

+ +

Note: strings in words may be unequal in length.

+ +

 

+

Example 1:

+ +
+Input: n = 3, words = ["bab","dab","cab"], groups = [1,2,2]
+Output: ["bab","cab"]
+Explanation: A subsequence that can be selected is [0,2].
+- groups[0] != groups[2]
+- words[0].length == words[2].length, and the hamming distance between them is 1.
+So, a valid answer is [words[0],words[2]] = ["bab","cab"].
+Another subsequence that can be selected is [0,1].
+- groups[0] != groups[1]
+- words[0].length == words[1].length, and the hamming distance between them is 1.
+So, another valid answer is [words[0],words[1]] = ["bab","dab"].
+It can be shown that the length of the longest subsequence of indices that satisfies the conditions is 2.  
+ +

Example 2:

+ +
+Input: n = 4, words = ["a","b","c","d"], groups = [1,2,3,4]
+Output: ["a","b","c","d"]
+Explanation: We can select the subsequence [0,1,2,3].
+It satisfies both conditions.
+Hence, the answer is [words[0],words[1],words[2],words[3]] = ["a","b","c","d"].
+It has the longest length among all subsequences of indices that satisfy the conditions.
+Hence, it is the only answer.
+
+ +

 

+

Constraints:

+ + + +## Solutions + + + +### **Python3** + +```python + +``` + +### **Java** + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2900-2999/2902.Count of Sub-Multisets With Bounded Sum/README.md b/solution/2900-2999/2902.Count of Sub-Multisets With Bounded Sum/README.md new file mode 100644 index 0000000000000..e86259fc288ef --- /dev/null +++ b/solution/2900-2999/2902.Count of Sub-Multisets With Bounded Sum/README.md @@ -0,0 +1,100 @@ +# [2902. 和带限制的子多重集合的数目](https://leetcode.cn/problems/count-of-sub-multisets-with-bounded-sum) + +[English Version](/solution/2900-2999/2902.Count%20of%20Sub-Multisets%20With%20Bounded%20Sum/README_EN.md) + +## 题目描述 + + + +

给你一个下标从 0 开始的非负整数数组 nums 和两个整数 l 和 r 。

+ +

请你返回 nums 中子多重集合的和在闭区间 [l, r] 之间的 子多重集合的数目

+ +

由于答案可能很大,请你将答案对 109 + 7 取余后返回。

+ +

子多重集合 指的是从数组中选出一些元素构成的 无序 集合,每个元素 x 出现的次数可以是 0, 1, ..., occ[x] 次,其中 occ[x] 是元素 x 在数组中的出现次数。

+ +

注意:

+ + + +

 

+ +

示例 1:

+ +
+输入:nums = [1,2,2,3], l = 6, r = 6
+输出:1
+解释:唯一和为 6 的子集合是 {1, 2, 3} 。
+
+ +

示例 2:

+ +
+输入:nums = [2,1,4,2,7], l = 1, r = 5
+输出:7
+解释:和在闭区间 [1, 5] 之间的子多重集合为 {1} ,{2} ,{4} ,{2, 2} ,{1, 2} ,{1, 4} 和 {1, 2, 2} 。
+
+ +

示例 3:

+ +
+输入:nums = [1,2,1,3,5,2], l = 3, r = 5
+输出:9
+解释:和在闭区间 [3, 5] 之间的子多重集合为 {3} ,{5} ,{1, 2} ,{1, 3} ,{2, 2} ,{2, 3} ,{1, 1, 2} ,{1, 1, 3} 和 {1, 2, 2} 。
+ +

 

+ +

提示:

+ + + +## 解法 + + + + + +### **Python3** + + + +```python + +``` + +### **Java** + + + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2900-2999/2902.Count of Sub-Multisets With Bounded Sum/README_EN.md b/solution/2900-2999/2902.Count of Sub-Multisets With Bounded Sum/README_EN.md new file mode 100644 index 0000000000000..164d3f62a5df3 --- /dev/null +++ b/solution/2900-2999/2902.Count of Sub-Multisets With Bounded Sum/README_EN.md @@ -0,0 +1,90 @@ +# [2902. Count of Sub-Multisets With Bounded Sum](https://leetcode.com/problems/count-of-sub-multisets-with-bounded-sum) + +[中文文档](/solution/2900-2999/2902.Count%20of%20Sub-Multisets%20With%20Bounded%20Sum/README.md) + +## Description + +

You are given a 0-indexed array nums of non-negative integers, and two integers l and r.

+ +

Return the count of sub-multisets within nums where the sum of elements in each subset falls within the inclusive range of [l, r].

+ +

Since the answer may be large, return it modulo 109 + 7.

+ +

A sub-multiset is an unordered collection of elements of the array in which a given value x can occur 0, 1, ..., occ[x] times, where occ[x] is the number of occurrences of x in the array.

+ +

Note that:

+ + + +

 

+

Example 1:

+ +
+Input: nums = [1,2,2,3], l = 6, r = 6
+Output: 1
+Explanation: The only subset of nums that has a sum of 6 is {1, 2, 3}.
+
+ +

Example 2:

+ +
+Input: nums = [2,1,4,2,7], l = 1, r = 5
+Output: 7
+Explanation: The subsets of nums that have a sum within the range [1, 5] are {1}, {2}, {4}, {2, 2}, {1, 2}, {1, 4}, and {1, 2, 2}.
+
+ +

Example 3:

+ +
+Input: nums = [1,2,1,3,5,2], l = 3, r = 5
+Output: 9
+Explanation: The subsets of nums that have a sum within the range [3, 5] are {3}, {5}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {1, 1, 2}, {1, 1, 3}, and {1, 2, 2}.
+ +

 

+

Constraints:

+ + + +## Solutions + + + +### **Python3** + +```python + +``` + +### **Java** + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/CONTEST_README.md b/solution/CONTEST_README.md index 8c239d0bd0053..e35fe9d4f2580 100644 --- a/solution/CONTEST_README.md +++ b/solution/CONTEST_README.md @@ -22,6 +22,13 @@ ## 往期竞赛 +#### 第 115 场双周赛(2023-10-14 22:30, 90 分钟) 参赛人数 2809 + +- [2899. 上一个遍历的整数](/solution/2800-2899/2899.Last%20Visited%20Integers/README.md) +- [2900. 最长相邻不相等子序列 I](/solution/2900-2999/2900.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20I/README.md) +- [2901. 最长相邻不相等子序列 II](/solution/2900-2999/2901.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20II/README.md) +- [2902. 和带限制的子多重集合的数目](/solution/2900-2999/2902.Count%20of%20Sub-Multisets%20With%20Bounded%20Sum/README.md) + #### 第 366 场周赛(2023-10-08 10:30, 90 分钟) 参赛人数 2790 - [2894. 分类求和并作差](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README.md) diff --git a/solution/CONTEST_README_EN.md b/solution/CONTEST_README_EN.md index fbba212a38f33..172a171425621 100644 --- a/solution/CONTEST_README_EN.md +++ b/solution/CONTEST_README_EN.md @@ -25,6 +25,13 @@ Get your rating changes right after the completion of LeetCode contests, https:/ ## Past Contests +#### Biweekly Contest 115 + +- [2899. Last Visited Integers](/solution/2800-2899/2899.Last%20Visited%20Integers/README_EN.md) +- [2900. Longest Unequal Adjacent Groups Subsequence I](/solution/2900-2999/2900.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20I/README_EN.md) +- [2901. Longest Unequal Adjacent Groups Subsequence II](/solution/2900-2999/2901.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20II/README_EN.md) +- [2902. Count of Sub-Multisets With Bounded Sum](/solution/2900-2999/2902.Count%20of%20Sub-Multisets%20With%20Bounded%20Sum/README_EN.md) + #### Weekly Contest 366 - [2894. Divisible and Non-divisible Sums Difference](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README_EN.md) diff --git a/solution/DATABASE_README.md b/solution/DATABASE_README.md index 87a73ec15b617..3247d9542cfad 100644 --- a/solution/DATABASE_README.md +++ b/solution/DATABASE_README.md @@ -245,7 +245,7 @@ | 2837 | [总旅行距离](/solution/2800-2899/2837.Total%20Traveled%20Distance/README.md) | `数据库` | 简单 | 🔒 | | 2853 | [最高薪水差异](/solution/2800-2899/2853.Highest%20Salaries%20Difference/README.md) | `数据库` | 简单 | 🔒 | | 2854 | [滚动平均步数](/solution/2800-2899/2854.Rolling%20Average%20Steps/README.md) | `数据库` | 中等 | 🔒 | -| 2893 | [计算每个区间内的订单](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) | `数据库` | 中等 | 🔒 | +| 2893 | [Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) | | 中等 | 🔒 | ## 版权 diff --git a/solution/DATABASE_README_EN.md b/solution/DATABASE_README_EN.md index 9ea0768a5145f..47be2a14f8813 100644 --- a/solution/DATABASE_README_EN.md +++ b/solution/DATABASE_README_EN.md @@ -243,7 +243,7 @@ Press Control + F(or Command + F on | 2837 | [Total Traveled Distance](/solution/2800-2899/2837.Total%20Traveled%20Distance/README_EN.md) | `Database` | Easy | 🔒 | | 2853 | [Highest Salaries Difference](/solution/2800-2899/2853.Highest%20Salaries%20Difference/README_EN.md) | `Database` | Easy | 🔒 | | 2854 | [Rolling Average Steps](/solution/2800-2899/2854.Rolling%20Average%20Steps/README_EN.md) | `Database` | Medium | 🔒 | -| 2893 | [Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README_EN.md) | `Database` | Medium | 🔒 | +| 2893 | [Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README_EN.md) | | Medium | 🔒 | ## Copyright diff --git a/solution/JAVASCRIPT_README.md b/solution/JAVASCRIPT_README.md index 37b2eb93a6701..f8d07d4d6c519 100644 --- a/solution/JAVASCRIPT_README.md +++ b/solution/JAVASCRIPT_README.md @@ -70,7 +70,7 @@ | 2794 | [从两个数组中创建对象](/solution/2700-2799/2794.Create%20Object%20from%20Two%20Arrays/README.md) | | 简单 | 🔒 | | 2795 | [并行执行 Promise 以获取独有的结果](/solution/2700-2799/2795.Parallel%20Execution%20of%20Promises%20for%20Individual%20Results%20Retrieval/README.md) | | 中等 | 🔒 | | 2796 | [重复字符串](/solution/2700-2799/2796.Repeat%20String/README.md) | | 简单 | 🔒 | -| 2797 | [带有占位符的部分函数](/solution/2700-2799/2797.Partial%20Function%20with%20Placeholders/README.md) | | 简单 | 🔒 | +| 2797 | [带有占位符的部分函数](/solution/2700-2799/2797.Partial%20Function%20with%20Placeholders/README.md) | | 中等 | 🔒 | | 2803 | [阶乘生成器](/solution/2800-2899/2803.Factorial%20Generator/README.md) | | 简单 | 🔒 | | 2804 | [数组原型的 forEach 方法](/solution/2800-2899/2804.Array%20Prototype%20ForEach/README.md) | | 简单 | 🔒 | | 2805 | [自定义间隔](/solution/2800-2899/2805.Custom%20Interval/README.md) | | 中等 | 🔒 | diff --git a/solution/JAVASCRIPT_README_EN.md b/solution/JAVASCRIPT_README_EN.md index 84361d3bc3554..f52785b99c9d9 100644 --- a/solution/JAVASCRIPT_README_EN.md +++ b/solution/JAVASCRIPT_README_EN.md @@ -68,7 +68,7 @@ Press Control + F(or Command + F on | 2794 | [Create Object from Two Arrays](/solution/2700-2799/2794.Create%20Object%20from%20Two%20Arrays/README_EN.md) | | Easy | 🔒 | | 2795 | [Parallel Execution of Promises for Individual Results Retrieval](/solution/2700-2799/2795.Parallel%20Execution%20of%20Promises%20for%20Individual%20Results%20Retrieval/README_EN.md) | | Medium | 🔒 | | 2796 | [Repeat String](/solution/2700-2799/2796.Repeat%20String/README_EN.md) | | Easy | 🔒 | -| 2797 | [Partial Function with Placeholders](/solution/2700-2799/2797.Partial%20Function%20with%20Placeholders/README_EN.md) | | Easy | 🔒 | +| 2797 | [Partial Function with Placeholders](/solution/2700-2799/2797.Partial%20Function%20with%20Placeholders/README_EN.md) | | Medium | 🔒 | | 2803 | [Factorial Generator](/solution/2800-2899/2803.Factorial%20Generator/README_EN.md) | | Easy | 🔒 | | 2804 | [Array Prototype ForEach](/solution/2800-2899/2804.Array%20Prototype%20ForEach/README_EN.md) | | Easy | 🔒 | | 2805 | [Custom Interval](/solution/2800-2899/2805.Custom%20Interval/README_EN.md) | | Medium | 🔒 | diff --git a/solution/README.md b/solution/README.md index 64fc0320f22a0..77ef0975016fd 100644 --- a/solution/README.md +++ b/solution/README.md @@ -287,7 +287,7 @@ | 0274 | [H 指数](/solution/0200-0299/0274.H-Index/README.md) | `数组`,`计数排序`,`排序` | 中等 | | | 0275 | [H 指数 II](/solution/0200-0299/0275.H-Index%20II/README.md) | `数组`,`二分查找` | 中等 | | | 0276 | [栅栏涂色](/solution/0200-0299/0276.Paint%20Fence/README.md) | `动态规划` | 中等 | 🔒 | -| 0277 | [搜寻名人](/solution/0200-0299/0277.Find%20the%20Celebrity/README.md) | `图`,`双指针`,`交互` | 中等 | 🔒 | +| 0277 | [搜寻名人](/solution/0200-0299/0277.Find%20the%20Celebrity/README.md) | `贪心`,`图`,`双指针`,`交互` | 中等 | 🔒 | | 0278 | [第一个错误的版本](/solution/0200-0299/0278.First%20Bad%20Version/README.md) | `二分查找`,`交互` | 简单 | | | 0279 | [完全平方数](/solution/0200-0299/0279.Perfect%20Squares/README.md) | `广度优先搜索`,`数学`,`动态规划` | 中等 | | | 0280 | [摆动排序](/solution/0200-0299/0280.Wiggle%20Sort/README.md) | `贪心`,`数组`,`排序` | 中等 | 🔒 | @@ -358,12 +358,12 @@ | 0345 | [反转字符串中的元音字母](/solution/0300-0399/0345.Reverse%20Vowels%20of%20a%20String/README.md) | `双指针`,`字符串` | 简单 | | | 0346 | [数据流中的移动平均值](/solution/0300-0399/0346.Moving%20Average%20from%20Data%20Stream/README.md) | `设计`,`队列`,`数组`,`数据流` | 简单 | 🔒 | | 0347 | [前 K 个高频元素](/solution/0300-0399/0347.Top%20K%20Frequent%20Elements/README.md) | `数组`,`哈希表`,`分治`,`桶排序`,`计数`,`快速选择`,`排序`,`堆(优先队列)` | 中等 | | -| 0348 | [设计井字棋](/solution/0300-0399/0348.Design%20Tic-Tac-Toe/README.md) | `设计`,`数组`,`哈希表`,`矩阵`,`模拟` | 中等 | 🔒 | +| 0348 | [设计井字棋](/solution/0300-0399/0348.Design%20Tic-Tac-Toe/README.md) | `设计`,`数组`,`哈希表`,`矩阵` | 中等 | 🔒 | | 0349 | [两个数组的交集](/solution/0300-0399/0349.Intersection%20of%20Two%20Arrays/README.md) | `数组`,`哈希表`,`双指针`,`二分查找`,`排序` | 简单 | | | 0350 | [两个数组的交集 II](/solution/0300-0399/0350.Intersection%20of%20Two%20Arrays%20II/README.md) | `数组`,`哈希表`,`双指针`,`二分查找`,`排序` | 简单 | | | 0351 | [安卓系统手势解锁](/solution/0300-0399/0351.Android%20Unlock%20Patterns/README.md) | `动态规划`,`回溯` | 中等 | 🔒 | | 0352 | [将数据流变为多个不相交区间](/solution/0300-0399/0352.Data%20Stream%20as%20Disjoint%20Intervals/README.md) | `设计`,`二分查找`,`有序集合` | 困难 | | -| 0353 | [贪吃蛇](/solution/0300-0399/0353.Design%20Snake%20Game/README.md) | `设计`,`队列`,`数组`,`哈希表`,`模拟` | 中等 | 🔒 | +| 0353 | [贪吃蛇](/solution/0300-0399/0353.Design%20Snake%20Game/README.md) | `设计`,`队列`,`数组`,`矩阵` | 中等 | 🔒 | | 0354 | [俄罗斯套娃信封问题](/solution/0300-0399/0354.Russian%20Doll%20Envelopes/README.md) | `数组`,`二分查找`,`动态规划`,`排序` | 困难 | | | 0355 | [设计推特](/solution/0300-0399/0355.Design%20Twitter/README.md) | `设计`,`哈希表`,`链表`,`堆(优先队列)` | 中等 | | | 0356 | [直线镜像](/solution/0300-0399/0356.Line%20Reflection/README.md) | `数组`,`哈希表`,`数学` | 中等 | 🔒 | @@ -500,7 +500,7 @@ | 0487 | [最大连续1的个数 II](/solution/0400-0499/0487.Max%20Consecutive%20Ones%20II/README.md) | `数组`,`动态规划`,`滑动窗口` | 中等 | 🔒 | | 0488 | [祖玛游戏](/solution/0400-0499/0488.Zuma%20Game/README.md) | `栈`,`广度优先搜索`,`记忆化搜索`,`字符串`,`动态规划` | 困难 | | | 0489 | [扫地机器人](/solution/0400-0499/0489.Robot%20Room%20Cleaner/README.md) | `回溯`,`交互` | 困难 | 🔒 | -| 0490 | [迷宫](/solution/0400-0499/0490.The%20Maze/README.md) | `深度优先搜索`,`广度优先搜索`,`数组`,`矩阵` | 中等 | 🔒 | +| 0490 | [迷宫](/solution/0400-0499/0490.The%20Maze/README.md) | `深度优先搜索`,`广度优先搜索`,`图` | 中等 | 🔒 | | 0491 | [递增子序列](/solution/0400-0499/0491.Non-decreasing%20Subsequences/README.md) | `位运算`,`数组`,`哈希表`,`回溯` | 中等 | | | 0492 | [构造矩形](/solution/0400-0499/0492.Construct%20the%20Rectangle/README.md) | `数学` | 简单 | | | 0493 | [翻转对](/solution/0400-0499/0493.Reverse%20Pairs/README.md) | `树状数组`,`线段树`,`数组`,`二分查找`,`分治`,`有序集合`,`归并排序` | 困难 | | @@ -509,13 +509,13 @@ | 0496 | [下一个更大元素 I](/solution/0400-0499/0496.Next%20Greater%20Element%20I/README.md) | `栈`,`数组`,`哈希表`,`单调栈` | 简单 | | | 0497 | [非重叠矩形中的随机点](/solution/0400-0499/0497.Random%20Point%20in%20Non-overlapping%20Rectangles/README.md) | `水塘抽样`,`数组`,`数学`,`二分查找`,`有序集合`,`前缀和`,`随机化` | 中等 | | | 0498 | [对角线遍历](/solution/0400-0499/0498.Diagonal%20Traverse/README.md) | `数组`,`矩阵`,`模拟` | 中等 | | -| 0499 | [迷宫 III](/solution/0400-0499/0499.The%20Maze%20III/README.md) | `深度优先搜索`,`广度优先搜索`,`图`,`数组`,`字符串`,`矩阵`,`最短路`,`堆(优先队列)` | 困难 | 🔒 | +| 0499 | [迷宫 III](/solution/0400-0499/0499.The%20Maze%20III/README.md) | `深度优先搜索`,`广度优先搜索`,`图`,`最短路`,`堆(优先队列)` | 困难 | 🔒 | | 0500 | [键盘行](/solution/0500-0599/0500.Keyboard%20Row/README.md) | `数组`,`哈希表`,`字符串` | 简单 | | | 0501 | [二叉搜索树中的众数](/solution/0500-0599/0501.Find%20Mode%20in%20Binary%20Search%20Tree/README.md) | `树`,`深度优先搜索`,`二叉搜索树`,`二叉树` | 简单 | | | 0502 | [IPO](/solution/0500-0599/0502.IPO/README.md) | `贪心`,`数组`,`排序`,`堆(优先队列)` | 困难 | | | 0503 | [下一个更大元素 II](/solution/0500-0599/0503.Next%20Greater%20Element%20II/README.md) | `栈`,`数组`,`单调栈` | 中等 | | | 0504 | [七进制数](/solution/0500-0599/0504.Base%207/README.md) | `数学` | 简单 | | -| 0505 | [迷宫 II](/solution/0500-0599/0505.The%20Maze%20II/README.md) | `深度优先搜索`,`广度优先搜索`,`图`,`数组`,`矩阵`,`最短路`,`堆(优先队列)` | 中等 | 🔒 | +| 0505 | [迷宫 II](/solution/0500-0599/0505.The%20Maze%20II/README.md) | `深度优先搜索`,`广度优先搜索`,`图`,`最短路`,`堆(优先队列)` | 中等 | 🔒 | | 0506 | [相对名次](/solution/0500-0599/0506.Relative%20Ranks/README.md) | `数组`,`排序`,`堆(优先队列)` | 简单 | | | 0507 | [完美数](/solution/0500-0599/0507.Perfect%20Number/README.md) | `数学` | 简单 | | | 0508 | [出现次数最多的子树元素和](/solution/0500-0599/0508.Most%20Frequent%20Subtree%20Sum/README.md) | `树`,`深度优先搜索`,`哈希表`,`二叉树` | 中等 | | @@ -676,7 +676,7 @@ | 0663 | [均匀树划分](/solution/0600-0699/0663.Equal%20Tree%20Partition/README.md) | `树`,`深度优先搜索`,`二叉树` | 中等 | 🔒 | | 0664 | [奇怪的打印机](/solution/0600-0699/0664.Strange%20Printer/README.md) | `字符串`,`动态规划` | 困难 | | | 0665 | [非递减数列](/solution/0600-0699/0665.Non-decreasing%20Array/README.md) | `数组` | 中等 | | -| 0666 | [路径总和 IV](/solution/0600-0699/0666.Path%20Sum%20IV/README.md) | `树`,`深度优先搜索`,`数组`,`哈希表`,`二叉树` | 中等 | 🔒 | +| 0666 | [路径总和 IV](/solution/0600-0699/0666.Path%20Sum%20IV/README.md) | `树`,`深度优先搜索`,`数组`,`二叉树` | 中等 | 🔒 | | 0667 | [优美的排列 II](/solution/0600-0699/0667.Beautiful%20Arrangement%20II/README.md) | `数组`,`数学` | 中等 | | | 0668 | [乘法表中第k小的数](/solution/0600-0699/0668.Kth%20Smallest%20Number%20in%20Multiplication%20Table/README.md) | `数学`,`二分查找` | 困难 | | | 0669 | [修剪二叉搜索树](/solution/0600-0699/0669.Trim%20a%20Binary%20Search%20Tree/README.md) | `树`,`深度优先搜索`,`二叉搜索树`,`二叉树` | 中等 | | @@ -804,7 +804,7 @@ | 0791 | [自定义字符串排序](/solution/0700-0799/0791.Custom%20Sort%20String/README.md) | `哈希表`,`字符串`,`排序` | 中等 | | | 0792 | [匹配子序列的单词数](/solution/0700-0799/0792.Number%20of%20Matching%20Subsequences/README.md) | `字典树`,`数组`,`哈希表`,`字符串`,`二分查找`,`动态规划`,`排序` | 中等 | | | 0793 | [阶乘函数后 K 个零](/solution/0700-0799/0793.Preimage%20Size%20of%20Factorial%20Zeroes%20Function/README.md) | `数学`,`二分查找` | 困难 | | -| 0794 | [有效的井字游戏](/solution/0700-0799/0794.Valid%20Tic-Tac-Toe%20State/README.md) | `数组`,`矩阵` | 中等 | | +| 0794 | [有效的井字游戏](/solution/0700-0799/0794.Valid%20Tic-Tac-Toe%20State/README.md) | `数组`,`字符串` | 中等 | | | 0795 | [区间子数组个数](/solution/0700-0799/0795.Number%20of%20Subarrays%20with%20Bounded%20Maximum/README.md) | `数组`,`双指针` | 中等 | | | 0796 | [旋转字符串](/solution/0700-0799/0796.Rotate%20String/README.md) | `字符串`,`字符串匹配` | 简单 | | | 0797 | [所有可能的路径](/solution/0700-0799/0797.All%20Paths%20From%20Source%20to%20Target/README.md) | `深度优先搜索`,`广度优先搜索`,`图`,`回溯` | 中等 | | @@ -2807,7 +2807,7 @@ | 2794 | [从两个数组中创建对象](/solution/2700-2799/2794.Create%20Object%20from%20Two%20Arrays/README.md) | | 简单 | 🔒 | | 2795 | [并行执行 Promise 以获取独有的结果](/solution/2700-2799/2795.Parallel%20Execution%20of%20Promises%20for%20Individual%20Results%20Retrieval/README.md) | | 中等 | 🔒 | | 2796 | [重复字符串](/solution/2700-2799/2796.Repeat%20String/README.md) | | 简单 | 🔒 | -| 2797 | [带有占位符的部分函数](/solution/2700-2799/2797.Partial%20Function%20with%20Placeholders/README.md) | | 简单 | 🔒 | +| 2797 | [带有占位符的部分函数](/solution/2700-2799/2797.Partial%20Function%20with%20Placeholders/README.md) | | 中等 | 🔒 | | 2798 | [满足目标工作时长的员工数目](/solution/2700-2799/2798.Number%20of%20Employees%20Who%20Met%20the%20Target/README.md) | `数组`,`枚举` | 简单 | 第 356 场周赛 | | 2799 | [统计完全子数组的数目](/solution/2700-2799/2799.Count%20Complete%20Subarrays%20in%20an%20Array/README.md) | `数组`,`哈希表`,`滑动窗口` | 中等 | 第 356 场周赛 | | 2800 | [包含三个字符串的最短字符串](/solution/2800-2899/2800.Shortest%20String%20That%20Contains%20Three%20Strings/README.md) | `贪心`,`字符串`,`枚举` | 中等 | 第 356 场周赛 | @@ -2902,13 +2902,17 @@ | 2889 | [数据重塑:透视](/solution/2800-2899/2889.Reshape%20Data%20Pivot/README.md) | | 简单 | | | 2890 | [重塑数据:融合](/solution/2800-2899/2890.Reshape%20Data%20Melt/README.md) | | 简单 | | | 2891 | [方法链](/solution/2800-2899/2891.Method%20Chaining/README.md) | | 简单 | | -| 2892 | [将相邻元素相乘后得到最小化数组](/solution/2800-2899/2892.Minimizing%20Array%20After%20Replacing%20Pairs%20With%20Their%20Product/README.md) | `贪心`,`数组`,`动态规划` | 中等 | 🔒 | -| 2893 | [计算每个区间内的订单](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) | `数据库` | 中等 | 🔒 | -| 2894 | [分类求和并作差](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README.md) | `数学` | 简单 | 第 366 场周赛 | -| 2895 | [最小处理时间](/solution/2800-2899/2895.Minimum%20Processing%20Time/README.md) | `贪心`,`数组`,`排序` | 中等 | 第 366 场周赛 | -| 2896 | [执行操作使两个字符串相等](/solution/2800-2899/2896.Apply%20Operations%20to%20Make%20Two%20Strings%20Equal/README.md) | `字符串`,`动态规划` | 中等 | 第 366 场周赛 | -| 2897 | [对数组执行操作使平方和最大](/solution/2800-2899/2897.Apply%20Operations%20on%20Array%20to%20Maximize%20Sum%20of%20Squares/README.md) | `贪心`,`位运算`,`数组`,`哈希表` | 困难 | 第 366 场周赛 | +| 2892 | [将相邻元素相乘后得到最小化数组](/solution/2800-2899/2892.Minimizing%20Array%20After%20Replacing%20Pairs%20With%20Their%20Product/README.md) | | 中等 | 🔒 | +| 2893 | [Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) | | 中等 | 🔒 | +| 2894 | [分类求和并作差](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README.md) | | 简单 | 第 366 场周赛 | +| 2895 | [最小处理时间](/solution/2800-2899/2895.Minimum%20Processing%20Time/README.md) | | 中等 | 第 366 场周赛 | +| 2896 | [执行操作使两个字符串相等](/solution/2800-2899/2896.Apply%20Operations%20to%20Make%20Two%20Strings%20Equal/README.md) | | 中等 | 第 366 场周赛 | +| 2897 | [对数组执行操作使平方和最大](/solution/2800-2899/2897.Apply%20Operations%20on%20Array%20to%20Maximize%20Sum%20of%20Squares/README.md) | | 困难 | 第 366 场周赛 | | 2898 | [Maximum Linear Stock Score](/solution/2800-2899/2898.Maximum%20Linear%20Stock%20Score/README.md) | | 中等 | 🔒 | +| 2899 | [上一个遍历的整数](/solution/2800-2899/2899.Last%20Visited%20Integers/README.md) | | 简单 | 第 115 场双周赛 | +| 2900 | [最长相邻不相等子序列 I](/solution/2900-2999/2900.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20I/README.md) | | 中等 | 第 115 场双周赛 | +| 2901 | [最长相邻不相等子序列 II](/solution/2900-2999/2901.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20II/README.md) | | 中等 | 第 115 场双周赛 | +| 2902 | [和带限制的子多重集合的数目](/solution/2900-2999/2902.Count%20of%20Sub-Multisets%20With%20Bounded%20Sum/README.md) | | 困难 | 第 115 场双周赛 | ## 版权 diff --git a/solution/README_EN.md b/solution/README_EN.md index 563659b50ce2f..df6e6a867bb29 100644 --- a/solution/README_EN.md +++ b/solution/README_EN.md @@ -285,7 +285,7 @@ Press Control + F(or Command + F on | 0274 | [H-Index](/solution/0200-0299/0274.H-Index/README_EN.md) | `Array`,`Counting Sort`,`Sorting` | Medium | | | 0275 | [H-Index II](/solution/0200-0299/0275.H-Index%20II/README_EN.md) | `Array`,`Binary Search` | Medium | | | 0276 | [Paint Fence](/solution/0200-0299/0276.Paint%20Fence/README_EN.md) | `Dynamic Programming` | Medium | 🔒 | -| 0277 | [Find the Celebrity](/solution/0200-0299/0277.Find%20the%20Celebrity/README_EN.md) | `Graph`,`Two Pointers`,`Interactive` | Medium | 🔒 | +| 0277 | [Find the Celebrity](/solution/0200-0299/0277.Find%20the%20Celebrity/README_EN.md) | `Greedy`,`Graph`,`Two Pointers`,`Interactive` | Medium | 🔒 | | 0278 | [First Bad Version](/solution/0200-0299/0278.First%20Bad%20Version/README_EN.md) | `Binary Search`,`Interactive` | Easy | | | 0279 | [Perfect Squares](/solution/0200-0299/0279.Perfect%20Squares/README_EN.md) | `Breadth-First Search`,`Math`,`Dynamic Programming` | Medium | | | 0280 | [Wiggle Sort](/solution/0200-0299/0280.Wiggle%20Sort/README_EN.md) | `Greedy`,`Array`,`Sorting` | Medium | 🔒 | @@ -356,12 +356,12 @@ Press Control + F(or Command + F on | 0345 | [Reverse Vowels of a String](/solution/0300-0399/0345.Reverse%20Vowels%20of%20a%20String/README_EN.md) | `Two Pointers`,`String` | Easy | | | 0346 | [Moving Average from Data Stream](/solution/0300-0399/0346.Moving%20Average%20from%20Data%20Stream/README_EN.md) | `Design`,`Queue`,`Array`,`Data Stream` | Easy | 🔒 | | 0347 | [Top K Frequent Elements](/solution/0300-0399/0347.Top%20K%20Frequent%20Elements/README_EN.md) | `Array`,`Hash Table`,`Divide and Conquer`,`Bucket Sort`,`Counting`,`Quickselect`,`Sorting`,`Heap (Priority Queue)` | Medium | | -| 0348 | [Design Tic-Tac-Toe](/solution/0300-0399/0348.Design%20Tic-Tac-Toe/README_EN.md) | `Design`,`Array`,`Hash Table`,`Matrix`,`Simulation` | Medium | 🔒 | +| 0348 | [Design Tic-Tac-Toe](/solution/0300-0399/0348.Design%20Tic-Tac-Toe/README_EN.md) | `Design`,`Array`,`Hash Table`,`Matrix` | Medium | 🔒 | | 0349 | [Intersection of Two Arrays](/solution/0300-0399/0349.Intersection%20of%20Two%20Arrays/README_EN.md) | `Array`,`Hash Table`,`Two Pointers`,`Binary Search`,`Sorting` | Easy | | | 0350 | [Intersection of Two Arrays II](/solution/0300-0399/0350.Intersection%20of%20Two%20Arrays%20II/README_EN.md) | `Array`,`Hash Table`,`Two Pointers`,`Binary Search`,`Sorting` | Easy | | | 0351 | [Android Unlock Patterns](/solution/0300-0399/0351.Android%20Unlock%20Patterns/README_EN.md) | `Dynamic Programming`,`Backtracking` | Medium | 🔒 | | 0352 | [Data Stream as Disjoint Intervals](/solution/0300-0399/0352.Data%20Stream%20as%20Disjoint%20Intervals/README_EN.md) | `Design`,`Binary Search`,`Ordered Set` | Hard | | -| 0353 | [Design Snake Game](/solution/0300-0399/0353.Design%20Snake%20Game/README_EN.md) | `Design`,`Queue`,`Array`,`Hash Table`,`Simulation` | Medium | 🔒 | +| 0353 | [Design Snake Game](/solution/0300-0399/0353.Design%20Snake%20Game/README_EN.md) | `Design`,`Queue`,`Array`,`Matrix` | Medium | 🔒 | | 0354 | [Russian Doll Envelopes](/solution/0300-0399/0354.Russian%20Doll%20Envelopes/README_EN.md) | `Array`,`Binary Search`,`Dynamic Programming`,`Sorting` | Hard | | | 0355 | [Design Twitter](/solution/0300-0399/0355.Design%20Twitter/README_EN.md) | `Design`,`Hash Table`,`Linked List`,`Heap (Priority Queue)` | Medium | | | 0356 | [Line Reflection](/solution/0300-0399/0356.Line%20Reflection/README_EN.md) | `Array`,`Hash Table`,`Math` | Medium | 🔒 | @@ -498,7 +498,7 @@ Press Control + F(or Command + F on | 0487 | [Max Consecutive Ones II](/solution/0400-0499/0487.Max%20Consecutive%20Ones%20II/README_EN.md) | `Array`,`Dynamic Programming`,`Sliding Window` | Medium | 🔒 | | 0488 | [Zuma Game](/solution/0400-0499/0488.Zuma%20Game/README_EN.md) | `Stack`,`Breadth-First Search`,`Memoization`,`String`,`Dynamic Programming` | Hard | | | 0489 | [Robot Room Cleaner](/solution/0400-0499/0489.Robot%20Room%20Cleaner/README_EN.md) | `Backtracking`,`Interactive` | Hard | 🔒 | -| 0490 | [The Maze](/solution/0400-0499/0490.The%20Maze/README_EN.md) | `Depth-First Search`,`Breadth-First Search`,`Array`,`Matrix` | Medium | 🔒 | +| 0490 | [The Maze](/solution/0400-0499/0490.The%20Maze/README_EN.md) | `Depth-First Search`,`Breadth-First Search`,`Graph` | Medium | 🔒 | | 0491 | [Non-decreasing Subsequences](/solution/0400-0499/0491.Non-decreasing%20Subsequences/README_EN.md) | `Bit Manipulation`,`Array`,`Hash Table`,`Backtracking` | Medium | | | 0492 | [Construct the Rectangle](/solution/0400-0499/0492.Construct%20the%20Rectangle/README_EN.md) | `Math` | Easy | | | 0493 | [Reverse Pairs](/solution/0400-0499/0493.Reverse%20Pairs/README_EN.md) | `Binary Indexed Tree`,`Segment Tree`,`Array`,`Binary Search`,`Divide and Conquer`,`Ordered Set`,`Merge Sort` | Hard | | @@ -507,13 +507,13 @@ Press Control + F(or Command + F on | 0496 | [Next Greater Element I](/solution/0400-0499/0496.Next%20Greater%20Element%20I/README_EN.md) | `Stack`,`Array`,`Hash Table`,`Monotonic Stack` | Easy | | | 0497 | [Random Point in Non-overlapping Rectangles](/solution/0400-0499/0497.Random%20Point%20in%20Non-overlapping%20Rectangles/README_EN.md) | `Reservoir Sampling`,`Array`,`Math`,`Binary Search`,`Ordered Set`,`Prefix Sum`,`Randomized` | Medium | | | 0498 | [Diagonal Traverse](/solution/0400-0499/0498.Diagonal%20Traverse/README_EN.md) | `Array`,`Matrix`,`Simulation` | Medium | | -| 0499 | [The Maze III](/solution/0400-0499/0499.The%20Maze%20III/README_EN.md) | `Depth-First Search`,`Breadth-First Search`,`Graph`,`Array`,`String`,`Matrix`,`Shortest Path`,`Heap (Priority Queue)` | Hard | 🔒 | +| 0499 | [The Maze III](/solution/0400-0499/0499.The%20Maze%20III/README_EN.md) | `Depth-First Search`,`Breadth-First Search`,`Graph`,`Shortest Path`,`Heap (Priority Queue)` | Hard | 🔒 | | 0500 | [Keyboard Row](/solution/0500-0599/0500.Keyboard%20Row/README_EN.md) | `Array`,`Hash Table`,`String` | Easy | | | 0501 | [Find Mode in Binary Search Tree](/solution/0500-0599/0501.Find%20Mode%20in%20Binary%20Search%20Tree/README_EN.md) | `Tree`,`Depth-First Search`,`Binary Search Tree`,`Binary Tree` | Easy | | | 0502 | [IPO](/solution/0500-0599/0502.IPO/README_EN.md) | `Greedy`,`Array`,`Sorting`,`Heap (Priority Queue)` | Hard | | | 0503 | [Next Greater Element II](/solution/0500-0599/0503.Next%20Greater%20Element%20II/README_EN.md) | `Stack`,`Array`,`Monotonic Stack` | Medium | | | 0504 | [Base 7](/solution/0500-0599/0504.Base%207/README_EN.md) | `Math` | Easy | | -| 0505 | [The Maze II](/solution/0500-0599/0505.The%20Maze%20II/README_EN.md) | `Depth-First Search`,`Breadth-First Search`,`Graph`,`Array`,`Matrix`,`Shortest Path`,`Heap (Priority Queue)` | Medium | 🔒 | +| 0505 | [The Maze II](/solution/0500-0599/0505.The%20Maze%20II/README_EN.md) | `Depth-First Search`,`Breadth-First Search`,`Graph`,`Shortest Path`,`Heap (Priority Queue)` | Medium | 🔒 | | 0506 | [Relative Ranks](/solution/0500-0599/0506.Relative%20Ranks/README_EN.md) | `Array`,`Sorting`,`Heap (Priority Queue)` | Easy | | | 0507 | [Perfect Number](/solution/0500-0599/0507.Perfect%20Number/README_EN.md) | `Math` | Easy | | | 0508 | [Most Frequent Subtree Sum](/solution/0500-0599/0508.Most%20Frequent%20Subtree%20Sum/README_EN.md) | `Tree`,`Depth-First Search`,`Hash Table`,`Binary Tree` | Medium | | @@ -674,7 +674,7 @@ Press Control + F(or Command + F on | 0663 | [Equal Tree Partition](/solution/0600-0699/0663.Equal%20Tree%20Partition/README_EN.md) | `Tree`,`Depth-First Search`,`Binary Tree` | Medium | 🔒 | | 0664 | [Strange Printer](/solution/0600-0699/0664.Strange%20Printer/README_EN.md) | `String`,`Dynamic Programming` | Hard | | | 0665 | [Non-decreasing Array](/solution/0600-0699/0665.Non-decreasing%20Array/README_EN.md) | `Array` | Medium | | -| 0666 | [Path Sum IV](/solution/0600-0699/0666.Path%20Sum%20IV/README_EN.md) | `Tree`,`Depth-First Search`,`Array`,`Hash Table`,`Binary Tree` | Medium | 🔒 | +| 0666 | [Path Sum IV](/solution/0600-0699/0666.Path%20Sum%20IV/README_EN.md) | `Tree`,`Depth-First Search`,`Array`,`Binary Tree` | Medium | 🔒 | | 0667 | [Beautiful Arrangement II](/solution/0600-0699/0667.Beautiful%20Arrangement%20II/README_EN.md) | `Array`,`Math` | Medium | | | 0668 | [Kth Smallest Number in Multiplication Table](/solution/0600-0699/0668.Kth%20Smallest%20Number%20in%20Multiplication%20Table/README_EN.md) | `Math`,`Binary Search` | Hard | | | 0669 | [Trim a Binary Search Tree](/solution/0600-0699/0669.Trim%20a%20Binary%20Search%20Tree/README_EN.md) | `Tree`,`Depth-First Search`,`Binary Search Tree`,`Binary Tree` | Medium | | @@ -802,7 +802,7 @@ Press Control + F(or Command + F on | 0791 | [Custom Sort String](/solution/0700-0799/0791.Custom%20Sort%20String/README_EN.md) | `Hash Table`,`String`,`Sorting` | Medium | | | 0792 | [Number of Matching Subsequences](/solution/0700-0799/0792.Number%20of%20Matching%20Subsequences/README_EN.md) | `Trie`,`Array`,`Hash Table`,`String`,`Binary Search`,`Dynamic Programming`,`Sorting` | Medium | | | 0793 | [Preimage Size of Factorial Zeroes Function](/solution/0700-0799/0793.Preimage%20Size%20of%20Factorial%20Zeroes%20Function/README_EN.md) | `Math`,`Binary Search` | Hard | | -| 0794 | [Valid Tic-Tac-Toe State](/solution/0700-0799/0794.Valid%20Tic-Tac-Toe%20State/README_EN.md) | `Array`,`Matrix` | Medium | | +| 0794 | [Valid Tic-Tac-Toe State](/solution/0700-0799/0794.Valid%20Tic-Tac-Toe%20State/README_EN.md) | `Array`,`String` | Medium | | | 0795 | [Number of Subarrays with Bounded Maximum](/solution/0700-0799/0795.Number%20of%20Subarrays%20with%20Bounded%20Maximum/README_EN.md) | `Array`,`Two Pointers` | Medium | | | 0796 | [Rotate String](/solution/0700-0799/0796.Rotate%20String/README_EN.md) | `String`,`String Matching` | Easy | | | 0797 | [All Paths From Source to Target](/solution/0700-0799/0797.All%20Paths%20From%20Source%20to%20Target/README_EN.md) | `Depth-First Search`,`Breadth-First Search`,`Graph`,`Backtracking` | Medium | | @@ -2805,7 +2805,7 @@ Press Control + F(or Command + F on | 2794 | [Create Object from Two Arrays](/solution/2700-2799/2794.Create%20Object%20from%20Two%20Arrays/README_EN.md) | | Easy | 🔒 | | 2795 | [Parallel Execution of Promises for Individual Results Retrieval](/solution/2700-2799/2795.Parallel%20Execution%20of%20Promises%20for%20Individual%20Results%20Retrieval/README_EN.md) | | Medium | 🔒 | | 2796 | [Repeat String](/solution/2700-2799/2796.Repeat%20String/README_EN.md) | | Easy | 🔒 | -| 2797 | [Partial Function with Placeholders](/solution/2700-2799/2797.Partial%20Function%20with%20Placeholders/README_EN.md) | | Easy | 🔒 | +| 2797 | [Partial Function with Placeholders](/solution/2700-2799/2797.Partial%20Function%20with%20Placeholders/README_EN.md) | | Medium | 🔒 | | 2798 | [Number of Employees Who Met the Target](/solution/2700-2799/2798.Number%20of%20Employees%20Who%20Met%20the%20Target/README_EN.md) | `Array`,`Enumeration` | Easy | Weekly Contest 356 | | 2799 | [Count Complete Subarrays in an Array](/solution/2700-2799/2799.Count%20Complete%20Subarrays%20in%20an%20Array/README_EN.md) | `Array`,`Hash Table`,`Sliding Window` | Medium | Weekly Contest 356 | | 2800 | [Shortest String That Contains Three Strings](/solution/2800-2899/2800.Shortest%20String%20That%20Contains%20Three%20Strings/README_EN.md) | `Greedy`,`String`,`Enumeration` | Medium | Weekly Contest 356 | @@ -2900,13 +2900,17 @@ Press Control + F(or Command + F on | 2889 | [Reshape Data Pivot](/solution/2800-2899/2889.Reshape%20Data%20Pivot/README_EN.md) | | Easy | | | 2890 | [Reshape Data Melt](/solution/2800-2899/2890.Reshape%20Data%20Melt/README_EN.md) | | Easy | | | 2891 | [Method Chaining](/solution/2800-2899/2891.Method%20Chaining/README_EN.md) | | Easy | | -| 2892 | [Minimizing Array After Replacing Pairs With Their Product](/solution/2800-2899/2892.Minimizing%20Array%20After%20Replacing%20Pairs%20With%20Their%20Product/README_EN.md) | `Greedy`,`Array`,`Dynamic Programming` | Medium | 🔒 | -| 2893 | [Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README_EN.md) | `Database` | Medium | 🔒 | -| 2894 | [Divisible and Non-divisible Sums Difference](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README_EN.md) | `Math` | Easy | Weekly Contest 366 | -| 2895 | [Minimum Processing Time](/solution/2800-2899/2895.Minimum%20Processing%20Time/README_EN.md) | `Greedy`,`Array`,`Sorting` | Medium | Weekly Contest 366 | -| 2896 | [Apply Operations to Make Two Strings Equal](/solution/2800-2899/2896.Apply%20Operations%20to%20Make%20Two%20Strings%20Equal/README_EN.md) | `String`,`Dynamic Programming` | Medium | Weekly Contest 366 | -| 2897 | [Apply Operations on Array to Maximize Sum of Squares](/solution/2800-2899/2897.Apply%20Operations%20on%20Array%20to%20Maximize%20Sum%20of%20Squares/README_EN.md) | `Greedy`,`Bit Manipulation`,`Array`,`Hash Table` | Hard | Weekly Contest 366 | +| 2892 | [Minimizing Array After Replacing Pairs With Their Product](/solution/2800-2899/2892.Minimizing%20Array%20After%20Replacing%20Pairs%20With%20Their%20Product/README_EN.md) | | Medium | 🔒 | +| 2893 | [Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README_EN.md) | | Medium | 🔒 | +| 2894 | [Divisible and Non-divisible Sums Difference](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README_EN.md) | | Easy | Weekly Contest 366 | +| 2895 | [Minimum Processing Time](/solution/2800-2899/2895.Minimum%20Processing%20Time/README_EN.md) | | Medium | Weekly Contest 366 | +| 2896 | [Apply Operations to Make Two Strings Equal](/solution/2800-2899/2896.Apply%20Operations%20to%20Make%20Two%20Strings%20Equal/README_EN.md) | | Medium | Weekly Contest 366 | +| 2897 | [Apply Operations on Array to Maximize Sum of Squares](/solution/2800-2899/2897.Apply%20Operations%20on%20Array%20to%20Maximize%20Sum%20of%20Squares/README_EN.md) | | Hard | Weekly Contest 366 | | 2898 | [Maximum Linear Stock Score](/solution/2800-2899/2898.Maximum%20Linear%20Stock%20Score/README_EN.md) | | Medium | 🔒 | +| 2899 | [Last Visited Integers](/solution/2800-2899/2899.Last%20Visited%20Integers/README_EN.md) | | Easy | Biweekly Contest 115 | +| 2900 | [Longest Unequal Adjacent Groups Subsequence I](/solution/2900-2999/2900.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20I/README_EN.md) | | Medium | Biweekly Contest 115 | +| 2901 | [Longest Unequal Adjacent Groups Subsequence II](/solution/2900-2999/2901.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20II/README_EN.md) | | Medium | Biweekly Contest 115 | +| 2902 | [Count of Sub-Multisets With Bounded Sum](/solution/2900-2999/2902.Count%20of%20Sub-Multisets%20With%20Bounded%20Sum/README_EN.md) | | Hard | Biweekly Contest 115 | ## Copyright diff --git a/solution/database-summary.md b/solution/database-summary.md index b3f657b752972..f033eaa9fa179 100644 --- a/solution/database-summary.md +++ b/solution/database-summary.md @@ -235,4 +235,4 @@ - [2837.总旅行距离](/database-solution/2800-2899/2837.Total%20Traveled%20Distance/README.md) - [2853.最高薪水差异](/database-solution/2800-2899/2853.Highest%20Salaries%20Difference/README.md) - [2854.滚动平均步数](/database-solution/2800-2899/2854.Rolling%20Average%20Steps/README.md) - - [2893.计算每个区间内的订单](/database-solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) + - [2893.Calculate Orders Within Each Interval](/database-solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) diff --git a/solution/summary.md b/solution/summary.md index 548e737bd92ac..21731f0a054d7 100644 --- a/solution/summary.md +++ b/solution/summary.md @@ -2948,9 +2948,15 @@ - [2890.重塑数据:融合](/solution/2800-2899/2890.Reshape%20Data%20Melt/README.md) - [2891.方法链](/solution/2800-2899/2891.Method%20Chaining/README.md) - [2892.将相邻元素相乘后得到最小化数组](/solution/2800-2899/2892.Minimizing%20Array%20After%20Replacing%20Pairs%20With%20Their%20Product/README.md) - - [2893.计算每个区间内的订单](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) + - [2893.Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) - [2894.分类求和并作差](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README.md) - [2895.最小处理时间](/solution/2800-2899/2895.Minimum%20Processing%20Time/README.md) - [2896.执行操作使两个字符串相等](/solution/2800-2899/2896.Apply%20Operations%20to%20Make%20Two%20Strings%20Equal/README.md) - [2897.对数组执行操作使平方和最大](/solution/2800-2899/2897.Apply%20Operations%20on%20Array%20to%20Maximize%20Sum%20of%20Squares/README.md) - [2898.Maximum Linear Stock Score](/solution/2800-2899/2898.Maximum%20Linear%20Stock%20Score/README.md) + - [2899.上一个遍历的整数](/solution/2800-2899/2899.Last%20Visited%20Integers/README.md) + +- 2900-2999 + - [2900.最长相邻不相等子序列 I](/solution/2900-2999/2900.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20I/README.md) + - [2901.最长相邻不相等子序列 II](/solution/2900-2999/2901.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20II/README.md) + - [2902.和带限制的子多重集合的数目](/solution/2900-2999/2902.Count%20of%20Sub-Multisets%20With%20Bounded%20Sum/README.md) diff --git a/solution/summary_en.md b/solution/summary_en.md index 18568eff6bbd2..e4be97bd46470 100644 --- a/solution/summary_en.md +++ b/solution/summary_en.md @@ -2954,3 +2954,9 @@ - [2896.Apply Operations to Make Two Strings Equal](/solution/2800-2899/2896.Apply%20Operations%20to%20Make%20Two%20Strings%20Equal/README_EN.md) - [2897.Apply Operations on Array to Maximize Sum of Squares](/solution/2800-2899/2897.Apply%20Operations%20on%20Array%20to%20Maximize%20Sum%20of%20Squares/README_EN.md) - [2898.Maximum Linear Stock Score](/solution/2800-2899/2898.Maximum%20Linear%20Stock%20Score/README_EN.md) + - [2899.Last Visited Integers](/solution/2800-2899/2899.Last%20Visited%20Integers/README_EN.md) + +- 2900-2999 + - [2900.Longest Unequal Adjacent Groups Subsequence I](/solution/2900-2999/2900.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20I/README_EN.md) + - [2901.Longest Unequal Adjacent Groups Subsequence II](/solution/2900-2999/2901.Longest%20Unequal%20Adjacent%20Groups%20Subsequence%20II/README_EN.md) + - [2902.Count of Sub-Multisets With Bounded Sum](/solution/2900-2999/2902.Count%20of%20Sub-Multisets%20With%20Bounded%20Sum/README_EN.md)