From 3ad6871ba826c6da554d9a0e77a427277db081bc Mon Sep 17 00:00:00 2001 From: yanglbme Date: Wed, 28 Aug 2024 09:28:11 +0800 Subject: [PATCH] feat: update lc problems --- .../README.md | 8 +- .../README_EN.md | 14 +- .../README.md | 8 +- .../README_EN.md | 8 +- .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../3227.Vowels Game in a String/README.md | 2 + .../3227.Vowels Game in a String/README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../3245.Alternating Groups III/README.md | 2 + .../3245.Alternating Groups III/README_EN.md | 2 + .../3200-3299/3248.Snake in Matrix/README.md | 2 + .../3248.Snake in Matrix/README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 2 + .../README_EN.md | 2 + .../3268.Find Overlapping Shifts II/README.md | 183 ++++++++++++++++++ .../README_EN.md | 183 ++++++++++++++++++ .../Solution.sql | 50 +++++ solution/DATABASE_README.md | 1 + solution/DATABASE_README_EN.md | 1 + solution/README.md | 1 + solution/README_EN.md | 1 + 75 files changed, 573 insertions(+), 13 deletions(-) create mode 100644 solution/3200-3299/3268.Find Overlapping Shifts II/README.md create mode 100644 solution/3200-3299/3268.Find Overlapping Shifts II/README_EN.md create mode 100644 solution/3200-3299/3268.Find Overlapping Shifts II/Solution.sql diff --git a/solution/1400-1499/1409.Queries on a Permutation With Key/README.md b/solution/1400-1499/1409.Queries on a Permutation With Key/README.md index 437e6419dc804..e162e51276e74 100644 --- a/solution/1400-1499/1409.Queries on a Permutation With Key/README.md +++ b/solution/1400-1499/1409.Queries on a Permutation With Key/README.md @@ -35,13 +35,13 @@ tags:
 输入:queries = [3,1,2,1], m = 5
-输出:[2,1,2,1]
+输出:[2,1,2,1] 
 解释:处理 queries 的过程如下:
 对于 i=0: queries[i]=3, P=[1,2,3,4,5], 3 在 P 中的位置是 2,然后我们把 3 移动到 P 的开头,得到 P=[3,1,2,4,5] 。
-对于 i=1: queries[i]=1, P=[3,1,2,4,5], 1 在 P 中的位置是 1,然后我们把 1 移动到 P 的开头,得到 P=[1,3,2,4,5] 。
+对于 i=1: queries[i]=1, P=[3,1,2,4,5], 1 在 P 中的位置是 1,然后我们把 1 移动到 P 的开头,得到 P=[1,3,2,4,5] 。 
 对于 i=2: queries[i]=2, P=[1,3,2,4,5], 2 在 P 中的位置是 2,然后我们把 2 移动到 P 的开头,得到 P=[2,1,3,4,5] 。
-对于 i=3: queries[i]=1, P=[2,1,3,4,5], 1 在 P 中的位置是 1,然后我们把 1 移动到 P 的开头,得到 P=[1,2,3,4,5] 。
-因此,包含结果的数组为 [2,1,2,1] 。
+对于 i=3: queries[i]=1, P=[2,1,3,4,5], 1 在 P 中的位置是 1,然后我们把 1 移动到 P 的开头,得到 P=[1,2,3,4,5] 。 
+因此,包含结果的数组为 [2,1,2,1] 。  
 

示例 2:

diff --git a/solution/1400-1499/1409.Queries on a Permutation With Key/README_EN.md b/solution/1400-1499/1409.Queries on a Permutation With Key/README_EN.md index 57ede61a61258..22d634b8357bd 100644 --- a/solution/1400-1499/1409.Queries on a Permutation With Key/README_EN.md +++ b/solution/1400-1499/1409.Queries on a Permutation With Key/README_EN.md @@ -34,13 +34,13 @@ tags:
 Input: queries = [3,1,2,1], m = 5
-Output: [2,1,2,1]
-Explanation: The queries are processed as follow:
-For i=0: queries[i]=3, P=[1,2,3,4,5], position of 3 in P is 2, then we move 3 to the beginning of P resulting in P=[3,1,2,4,5].
-For i=1: queries[i]=1, P=[3,1,2,4,5], position of 1 in P is 1, then we move 1 to the beginning of P resulting in P=[1,3,2,4,5].
-For i=2: queries[i]=2, P=[1,3,2,4,5], position of 2 in P is 2, then we move 2 to the beginning of P resulting in P=[2,1,3,4,5].
-For i=3: queries[i]=1, P=[2,1,3,4,5], position of 1 in P is 1, then we move 1 to the beginning of P resulting in P=[1,2,3,4,5].
-Therefore, the array containing the result is [2,1,2,1].
+Output: [2,1,2,1] 
+Explanation: The queries are processed as follow: 
+For i=0: queries[i]=3, P=[1,2,3,4,5], position of 3 in P is 2, then we move 3 to the beginning of P resulting in P=[3,1,2,4,5]. 
+For i=1: queries[i]=1, P=[3,1,2,4,5], position of 1 in P is 1, then we move 1 to the beginning of P resulting in P=[1,3,2,4,5]. 
+For i=2: queries[i]=2, P=[1,3,2,4,5], position of 2 in P is 2, then we move 2 to the beginning of P resulting in P=[2,1,3,4,5]. 
+For i=3: queries[i]=1, P=[2,1,3,4,5], position of 1 in P is 1, then we move 1 to the beginning of P resulting in P=[1,2,3,4,5]. 
+Therefore, the array containing the result is [2,1,2,1].  
 

Example 2:

diff --git a/solution/3100-3199/3156.Employee Task Duration and Concurrent Tasks/README.md b/solution/3100-3199/3156.Employee Task Duration and Concurrent Tasks/README.md index 7d5daacc3b2c5..f926643a36204 100644 --- a/solution/3100-3199/3156.Employee Task Duration and Concurrent Tasks/README.md +++ b/solution/3100-3199/3156.Employee Task Duration and Concurrent Tasks/README.md @@ -109,7 +109,13 @@ tags: -### 方法一 +### 方法一:合并 + 连接 + +我们首先将 `employee_id` 的 `start_time` 和 `end_time` 合并到一个新的表 `T` 中,然后使用 `LEAD` 函数计算出每个员工的下一个任务的开始时间,接着我们将 `T` 表和 `Tasks` 表连接起来,计算出每个员工的并发任务数,最后按照 `employee_id` 分组,计算出每个员工的总任务时间和最大并发任务数。 + +相似题目: + +- [3268. Find Overlapping Shifts II 🔒](https://github.com/doocs/leetcode/blob/main/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README.md) diff --git a/solution/3100-3199/3156.Employee Task Duration and Concurrent Tasks/README_EN.md b/solution/3100-3199/3156.Employee Task Duration and Concurrent Tasks/README_EN.md index 6903c881516de..73fffbfdef768 100644 --- a/solution/3100-3199/3156.Employee Task Duration and Concurrent Tasks/README_EN.md +++ b/solution/3100-3199/3156.Employee Task Duration and Concurrent Tasks/README_EN.md @@ -108,7 +108,13 @@ Each row in this table contains the task identifier, the employee identifier, an -### Solution 1 +### Solution 1: Merge + Join + +First, we merge the `start_time` and `end_time` for each `employee_id` into a new table `T`. Then, using the `LEAD` function, we calculate the start time of the next task for each employee. Next, we join table `T` with the `Tasks` table to compute the concurrent task count for each employee. Finally, we group by `employee_id` to calculate the total task duration and the maximum concurrent tasks for each employee. + +Similar Problem: + +- [3268. Find Overlapping Shifts II 🔒](https://github.com/doocs/leetcode/blob/main/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README_EN.md) diff --git a/solution/3200-3299/3222.Find the Winning Player in Coin Game/README.md b/solution/3200-3299/3222.Find the Winning Player in Coin Game/README.md index 7677d66714fe3..d2d5efced4dcf 100644 --- a/solution/3200-3299/3222.Find the Winning Player in Coin Game/README.md +++ b/solution/3200-3299/3222.Find the Winning Player in Coin Game/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3222.Find%20the%20Winning%20Player%20in%20Coin%20Game/README.md +rating: 1269 +source: 第 135 场双周赛 Q1 tags: - 数学 - 博弈 diff --git a/solution/3200-3299/3222.Find the Winning Player in Coin Game/README_EN.md b/solution/3200-3299/3222.Find the Winning Player in Coin Game/README_EN.md index 81e55b55eca37..62c6cbaf480cc 100644 --- a/solution/3200-3299/3222.Find the Winning Player in Coin Game/README_EN.md +++ b/solution/3200-3299/3222.Find the Winning Player in Coin Game/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3222.Find%20the%20Winning%20Player%20in%20Coin%20Game/README_EN.md +rating: 1269 +source: Biweekly Contest 135 Q1 tags: - Math - Game Theory diff --git a/solution/3200-3299/3223.Minimum Length of String After Operations/README.md b/solution/3200-3299/3223.Minimum Length of String After Operations/README.md index c2124a46f956b..2c8b73da51db6 100644 --- a/solution/3200-3299/3223.Minimum Length of String After Operations/README.md +++ b/solution/3200-3299/3223.Minimum Length of String After Operations/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3223.Minimum%20Length%20of%20String%20After%20Operations/README.md +rating: 1445 +source: 第 135 场双周赛 Q2 tags: - 哈希表 - 字符串 diff --git a/solution/3200-3299/3223.Minimum Length of String After Operations/README_EN.md b/solution/3200-3299/3223.Minimum Length of String After Operations/README_EN.md index 39c068822b53f..5d908d2656f37 100644 --- a/solution/3200-3299/3223.Minimum Length of String After Operations/README_EN.md +++ b/solution/3200-3299/3223.Minimum Length of String After Operations/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3223.Minimum%20Length%20of%20String%20After%20Operations/README_EN.md +rating: 1445 +source: Biweekly Contest 135 Q2 tags: - Hash Table - String diff --git a/solution/3200-3299/3224.Minimum Array Changes to Make Differences Equal/README.md b/solution/3200-3299/3224.Minimum Array Changes to Make Differences Equal/README.md index 82cb851a642af..5bbd629058f59 100644 --- a/solution/3200-3299/3224.Minimum Array Changes to Make Differences Equal/README.md +++ b/solution/3200-3299/3224.Minimum Array Changes to Make Differences Equal/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3224.Minimum%20Array%20Changes%20to%20Make%20Differences%20Equal/README.md +rating: 1996 +source: 第 135 场双周赛 Q3 tags: - 数组 - 哈希表 diff --git a/solution/3200-3299/3224.Minimum Array Changes to Make Differences Equal/README_EN.md b/solution/3200-3299/3224.Minimum Array Changes to Make Differences Equal/README_EN.md index 2b232818621b2..242423dcb6b62 100644 --- a/solution/3200-3299/3224.Minimum Array Changes to Make Differences Equal/README_EN.md +++ b/solution/3200-3299/3224.Minimum Array Changes to Make Differences Equal/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3224.Minimum%20Array%20Changes%20to%20Make%20Differences%20Equal/README_EN.md +rating: 1996 +source: Biweekly Contest 135 Q3 tags: - Array - Hash Table diff --git a/solution/3200-3299/3225.Maximum Score From Grid Operations/README.md b/solution/3200-3299/3225.Maximum Score From Grid Operations/README.md index cae9e276ea6af..92b49efc97d4f 100644 --- a/solution/3200-3299/3225.Maximum Score From Grid Operations/README.md +++ b/solution/3200-3299/3225.Maximum Score From Grid Operations/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3225.Maximum%20Score%20From%20Grid%20Operations/README.md +rating: 3027 +source: 第 135 场双周赛 Q4 tags: - 数组 - 动态规划 diff --git a/solution/3200-3299/3225.Maximum Score From Grid Operations/README_EN.md b/solution/3200-3299/3225.Maximum Score From Grid Operations/README_EN.md index 69a71198c1ab4..8df3e18a94383 100644 --- a/solution/3200-3299/3225.Maximum Score From Grid Operations/README_EN.md +++ b/solution/3200-3299/3225.Maximum Score From Grid Operations/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3225.Maximum%20Score%20From%20Grid%20Operations/README_EN.md +rating: 3027 +source: Biweekly Contest 135 Q4 tags: - Array - Dynamic Programming diff --git a/solution/3200-3299/3226.Number of Bit Changes to Make Two Integers Equal/README.md b/solution/3200-3299/3226.Number of Bit Changes to Make Two Integers Equal/README.md index 68da25abe8251..04d6d0850a1dc 100644 --- a/solution/3200-3299/3226.Number of Bit Changes to Make Two Integers Equal/README.md +++ b/solution/3200-3299/3226.Number of Bit Changes to Make Two Integers Equal/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3226.Number%20of%20Bit%20Changes%20to%20Make%20Two%20Integers%20Equal/README.md +rating: 1247 +source: 第 407 场周赛 Q1 tags: - 位运算 --- diff --git a/solution/3200-3299/3226.Number of Bit Changes to Make Two Integers Equal/README_EN.md b/solution/3200-3299/3226.Number of Bit Changes to Make Two Integers Equal/README_EN.md index bbf7790d96365..891c5e63f9968 100644 --- a/solution/3200-3299/3226.Number of Bit Changes to Make Two Integers Equal/README_EN.md +++ b/solution/3200-3299/3226.Number of Bit Changes to Make Two Integers Equal/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3226.Number%20of%20Bit%20Changes%20to%20Make%20Two%20Integers%20Equal/README_EN.md +rating: 1247 +source: Weekly Contest 407 Q1 tags: - Bit Manipulation --- diff --git a/solution/3200-3299/3227.Vowels Game in a String/README.md b/solution/3200-3299/3227.Vowels Game in a String/README.md index 7e67af7f5dcdb..8c089bc98b036 100644 --- a/solution/3200-3299/3227.Vowels Game in a String/README.md +++ b/solution/3200-3299/3227.Vowels Game in a String/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3227.Vowels%20Game%20in%20a%20String/README.md +rating: 1451 +source: 第 407 场周赛 Q2 tags: - 脑筋急转弯 - 数学 diff --git a/solution/3200-3299/3227.Vowels Game in a String/README_EN.md b/solution/3200-3299/3227.Vowels Game in a String/README_EN.md index db43ca010d722..9c9ce05d5c8ba 100644 --- a/solution/3200-3299/3227.Vowels Game in a String/README_EN.md +++ b/solution/3200-3299/3227.Vowels Game in a String/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3227.Vowels%20Game%20in%20a%20String/README_EN.md +rating: 1451 +source: Weekly Contest 407 Q2 tags: - Brainteaser - Math diff --git a/solution/3200-3299/3228.Maximum Number of Operations to Move Ones to the End/README.md b/solution/3200-3299/3228.Maximum Number of Operations to Move Ones to the End/README.md index cdc31cc1f0b15..2ab30c0cf52c6 100644 --- a/solution/3200-3299/3228.Maximum Number of Operations to Move Ones to the End/README.md +++ b/solution/3200-3299/3228.Maximum Number of Operations to Move Ones to the End/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3228.Maximum%20Number%20of%20Operations%20to%20Move%20Ones%20to%20the%20End/README.md +rating: 1593 +source: 第 407 场周赛 Q3 tags: - 贪心 - 字符串 diff --git a/solution/3200-3299/3228.Maximum Number of Operations to Move Ones to the End/README_EN.md b/solution/3200-3299/3228.Maximum Number of Operations to Move Ones to the End/README_EN.md index 614bd3ab469a0..2f1b503b2180f 100644 --- a/solution/3200-3299/3228.Maximum Number of Operations to Move Ones to the End/README_EN.md +++ b/solution/3200-3299/3228.Maximum Number of Operations to Move Ones to the End/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3228.Maximum%20Number%20of%20Operations%20to%20Move%20Ones%20to%20the%20End/README_EN.md +rating: 1593 +source: Weekly Contest 407 Q3 tags: - Greedy - String diff --git a/solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README.md b/solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README.md index b6254c4de823b..d9d1def47c0c7 100644 --- a/solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README.md +++ b/solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3229.Minimum%20Operations%20to%20Make%20Array%20Equal%20to%20Target/README.md +rating: 2066 +source: 第 407 场周赛 Q4 tags: - 栈 - 贪心 diff --git a/solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README_EN.md b/solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README_EN.md index a1c1204b2f0c0..0a0b6a7289a05 100644 --- a/solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README_EN.md +++ b/solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3229.Minimum%20Operations%20to%20Make%20Array%20Equal%20to%20Target/README_EN.md +rating: 2066 +source: Weekly Contest 407 Q4 tags: - Stack - Greedy diff --git a/solution/3200-3299/3232.Find if Digit Game Can Be Won/README.md b/solution/3200-3299/3232.Find if Digit Game Can Be Won/README.md index 2171348a81efa..fa664a94c44f0 100644 --- a/solution/3200-3299/3232.Find if Digit Game Can Be Won/README.md +++ b/solution/3200-3299/3232.Find if Digit Game Can Be Won/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3232.Find%20if%20Digit%20Game%20Can%20Be%20Won/README.md +rating: 1163 +source: 第 408 场周赛 Q1 tags: - 数组 - 数学 diff --git a/solution/3200-3299/3232.Find if Digit Game Can Be Won/README_EN.md b/solution/3200-3299/3232.Find if Digit Game Can Be Won/README_EN.md index 1c5ae8a16707c..b5c3b2927c2e7 100644 --- a/solution/3200-3299/3232.Find if Digit Game Can Be Won/README_EN.md +++ b/solution/3200-3299/3232.Find if Digit Game Can Be Won/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3232.Find%20if%20Digit%20Game%20Can%20Be%20Won/README_EN.md +rating: 1163 +source: Weekly Contest 408 Q1 tags: - Array - Math diff --git a/solution/3200-3299/3233.Find the Count of Numbers Which Are Not Special/README.md b/solution/3200-3299/3233.Find the Count of Numbers Which Are Not Special/README.md index 8cd65f830fd71..50ef13a98c9c4 100644 --- a/solution/3200-3299/3233.Find the Count of Numbers Which Are Not Special/README.md +++ b/solution/3200-3299/3233.Find the Count of Numbers Which Are Not Special/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3233.Find%20the%20Count%20of%20Numbers%20Which%20Are%20Not%20Special/README.md +rating: 1509 +source: 第 408 场周赛 Q2 tags: - 数组 - 数学 diff --git a/solution/3200-3299/3233.Find the Count of Numbers Which Are Not Special/README_EN.md b/solution/3200-3299/3233.Find the Count of Numbers Which Are Not Special/README_EN.md index 177d370511b8c..24a4f811f8434 100644 --- a/solution/3200-3299/3233.Find the Count of Numbers Which Are Not Special/README_EN.md +++ b/solution/3200-3299/3233.Find the Count of Numbers Which Are Not Special/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3233.Find%20the%20Count%20of%20Numbers%20Which%20Are%20Not%20Special/README_EN.md +rating: 1509 +source: Weekly Contest 408 Q2 tags: - Array - Math diff --git a/solution/3200-3299/3234.Count the Number of Substrings With Dominant Ones/README.md b/solution/3200-3299/3234.Count the Number of Substrings With Dominant Ones/README.md index b10e2e00877ed..469a8bd99eb45 100644 --- a/solution/3200-3299/3234.Count the Number of Substrings With Dominant Ones/README.md +++ b/solution/3200-3299/3234.Count the Number of Substrings With Dominant Ones/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3234.Count%20the%20Number%20of%20Substrings%20With%20Dominant%20Ones/README.md +rating: 2556 +source: 第 408 场周赛 Q3 tags: - 字符串 - 枚举 diff --git a/solution/3200-3299/3234.Count the Number of Substrings With Dominant Ones/README_EN.md b/solution/3200-3299/3234.Count the Number of Substrings With Dominant Ones/README_EN.md index 151fb87789c16..7bac33abddde5 100644 --- a/solution/3200-3299/3234.Count the Number of Substrings With Dominant Ones/README_EN.md +++ b/solution/3200-3299/3234.Count the Number of Substrings With Dominant Ones/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3234.Count%20the%20Number%20of%20Substrings%20With%20Dominant%20Ones/README_EN.md +rating: 2556 +source: Weekly Contest 408 Q3 tags: - String - Enumeration diff --git a/solution/3200-3299/3235.Check if the Rectangle Corner Is Reachable/README.md b/solution/3200-3299/3235.Check if the Rectangle Corner Is Reachable/README.md index 1e5e11ea22948..40a9aded2d990 100644 --- a/solution/3200-3299/3235.Check if the Rectangle Corner Is Reachable/README.md +++ b/solution/3200-3299/3235.Check if the Rectangle Corner Is Reachable/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3235.Check%20if%20the%20Rectangle%20Corner%20Is%20Reachable/README.md +rating: 3773 +source: 第 408 场周赛 Q4 tags: - 深度优先搜索 - 广度优先搜索 diff --git a/solution/3200-3299/3235.Check if the Rectangle Corner Is Reachable/README_EN.md b/solution/3200-3299/3235.Check if the Rectangle Corner Is Reachable/README_EN.md index 0df33207445b8..798c939884c5c 100644 --- a/solution/3200-3299/3235.Check if the Rectangle Corner Is Reachable/README_EN.md +++ b/solution/3200-3299/3235.Check if the Rectangle Corner Is Reachable/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3235.Check%20if%20the%20Rectangle%20Corner%20Is%20Reachable/README_EN.md +rating: 3773 +source: Weekly Contest 408 Q4 tags: - Depth-First Search - Breadth-First Search diff --git a/solution/3200-3299/3238.Find the Number of Winning Players/README.md b/solution/3200-3299/3238.Find the Number of Winning Players/README.md index bae3d97464d20..909fc64f7b4c4 100644 --- a/solution/3200-3299/3238.Find the Number of Winning Players/README.md +++ b/solution/3200-3299/3238.Find the Number of Winning Players/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3238.Find%20the%20Number%20of%20Winning%20Players/README.md +rating: 1285 +source: 第 136 场双周赛 Q1 tags: - 数组 - 哈希表 diff --git a/solution/3200-3299/3238.Find the Number of Winning Players/README_EN.md b/solution/3200-3299/3238.Find the Number of Winning Players/README_EN.md index 19b2f73e562ac..0012f08efbcb3 100644 --- a/solution/3200-3299/3238.Find the Number of Winning Players/README_EN.md +++ b/solution/3200-3299/3238.Find the Number of Winning Players/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3238.Find%20the%20Number%20of%20Winning%20Players/README_EN.md +rating: 1285 +source: Biweekly Contest 136 Q1 tags: - Array - Hash Table diff --git a/solution/3200-3299/3239.Minimum Number of Flips to Make Binary Grid Palindromic I/README.md b/solution/3200-3299/3239.Minimum Number of Flips to Make Binary Grid Palindromic I/README.md index f8d540b9b68ab..e9e7c3c383d2a 100644 --- a/solution/3200-3299/3239.Minimum Number of Flips to Make Binary Grid Palindromic I/README.md +++ b/solution/3200-3299/3239.Minimum Number of Flips to Make Binary Grid Palindromic I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3239.Minimum%20Number%20of%20Flips%20to%20Make%20Binary%20Grid%20Palindromic%20I/README.md +rating: 1387 +source: 第 136 场双周赛 Q2 tags: - 数组 - 双指针 diff --git a/solution/3200-3299/3239.Minimum Number of Flips to Make Binary Grid Palindromic I/README_EN.md b/solution/3200-3299/3239.Minimum Number of Flips to Make Binary Grid Palindromic I/README_EN.md index 0ead149965003..f9aee396d39c5 100644 --- a/solution/3200-3299/3239.Minimum Number of Flips to Make Binary Grid Palindromic I/README_EN.md +++ b/solution/3200-3299/3239.Minimum Number of Flips to Make Binary Grid Palindromic I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3239.Minimum%20Number%20of%20Flips%20to%20Make%20Binary%20Grid%20Palindromic%20I/README_EN.md +rating: 1387 +source: Biweekly Contest 136 Q2 tags: - Array - Two Pointers diff --git a/solution/3200-3299/3240.Minimum Number of Flips to Make Binary Grid Palindromic II/README.md b/solution/3200-3299/3240.Minimum Number of Flips to Make Binary Grid Palindromic II/README.md index c4e6ae769cf22..e4359f3d48a23 100644 --- a/solution/3200-3299/3240.Minimum Number of Flips to Make Binary Grid Palindromic II/README.md +++ b/solution/3200-3299/3240.Minimum Number of Flips to Make Binary Grid Palindromic II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3240.Minimum%20Number%20of%20Flips%20to%20Make%20Binary%20Grid%20Palindromic%20II/README.md +rating: 2080 +source: 第 136 场双周赛 Q3 tags: - 数组 - 双指针 diff --git a/solution/3200-3299/3240.Minimum Number of Flips to Make Binary Grid Palindromic II/README_EN.md b/solution/3200-3299/3240.Minimum Number of Flips to Make Binary Grid Palindromic II/README_EN.md index 970aa51e0baef..a5ad8b4198cf3 100644 --- a/solution/3200-3299/3240.Minimum Number of Flips to Make Binary Grid Palindromic II/README_EN.md +++ b/solution/3200-3299/3240.Minimum Number of Flips to Make Binary Grid Palindromic II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3240.Minimum%20Number%20of%20Flips%20to%20Make%20Binary%20Grid%20Palindromic%20II/README_EN.md +rating: 2080 +source: Biweekly Contest 136 Q3 tags: - Array - Two Pointers diff --git a/solution/3200-3299/3241.Time Taken to Mark All Nodes/README.md b/solution/3200-3299/3241.Time Taken to Mark All Nodes/README.md index 211aa877c13ab..2223a0159c366 100644 --- a/solution/3200-3299/3241.Time Taken to Mark All Nodes/README.md +++ b/solution/3200-3299/3241.Time Taken to Mark All Nodes/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3241.Time%20Taken%20to%20Mark%20All%20Nodes/README.md +rating: 2521 +source: 第 136 场双周赛 Q4 tags: - 树 - 深度优先搜索 diff --git a/solution/3200-3299/3241.Time Taken to Mark All Nodes/README_EN.md b/solution/3200-3299/3241.Time Taken to Mark All Nodes/README_EN.md index a955b1cedcc1a..ec7ea0a91c2d1 100644 --- a/solution/3200-3299/3241.Time Taken to Mark All Nodes/README_EN.md +++ b/solution/3200-3299/3241.Time Taken to Mark All Nodes/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3241.Time%20Taken%20to%20Mark%20All%20Nodes/README_EN.md +rating: 2521 +source: Biweekly Contest 136 Q4 tags: - Tree - Depth-First Search diff --git a/solution/3200-3299/3242.Design Neighbor Sum Service/README.md b/solution/3200-3299/3242.Design Neighbor Sum Service/README.md index 1980ce10be303..371340f5c5876 100644 --- a/solution/3200-3299/3242.Design Neighbor Sum Service/README.md +++ b/solution/3200-3299/3242.Design Neighbor Sum Service/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3242.Design%20Neighbor%20Sum%20Service/README.md +rating: 1334 +source: 第 409 场周赛 Q1 tags: - 设计 - 数组 diff --git a/solution/3200-3299/3242.Design Neighbor Sum Service/README_EN.md b/solution/3200-3299/3242.Design Neighbor Sum Service/README_EN.md index e04c93c92bc15..7d53c563b32b3 100644 --- a/solution/3200-3299/3242.Design Neighbor Sum Service/README_EN.md +++ b/solution/3200-3299/3242.Design Neighbor Sum Service/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3242.Design%20Neighbor%20Sum%20Service/README_EN.md +rating: 1334 +source: Weekly Contest 409 Q1 tags: - Design - Array diff --git a/solution/3200-3299/3243.Shortest Distance After Road Addition Queries I/README.md b/solution/3200-3299/3243.Shortest Distance After Road Addition Queries I/README.md index 15c34a23cfd1a..33bcf625aac61 100644 --- a/solution/3200-3299/3243.Shortest Distance After Road Addition Queries I/README.md +++ b/solution/3200-3299/3243.Shortest Distance After Road Addition Queries I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3243.Shortest%20Distance%20After%20Road%20Addition%20Queries%20I/README.md +rating: 1567 +source: 第 409 场周赛 Q2 tags: - 广度优先搜索 - 图 diff --git a/solution/3200-3299/3243.Shortest Distance After Road Addition Queries I/README_EN.md b/solution/3200-3299/3243.Shortest Distance After Road Addition Queries I/README_EN.md index 4ce3df8a95533..36e9cc40ff9ec 100644 --- a/solution/3200-3299/3243.Shortest Distance After Road Addition Queries I/README_EN.md +++ b/solution/3200-3299/3243.Shortest Distance After Road Addition Queries I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3243.Shortest%20Distance%20After%20Road%20Addition%20Queries%20I/README_EN.md +rating: 1567 +source: Weekly Contest 409 Q2 tags: - Breadth-First Search - Graph diff --git a/solution/3200-3299/3244.Shortest Distance After Road Addition Queries II/README.md b/solution/3200-3299/3244.Shortest Distance After Road Addition Queries II/README.md index 0ab7ceb21c877..ae2e85a3f8206 100644 --- a/solution/3200-3299/3244.Shortest Distance After Road Addition Queries II/README.md +++ b/solution/3200-3299/3244.Shortest Distance After Road Addition Queries II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3244.Shortest%20Distance%20After%20Road%20Addition%20Queries%20II/README.md +rating: 2270 +source: 第 409 场周赛 Q3 tags: - 贪心 - 图 diff --git a/solution/3200-3299/3244.Shortest Distance After Road Addition Queries II/README_EN.md b/solution/3200-3299/3244.Shortest Distance After Road Addition Queries II/README_EN.md index ff4e704f59529..70245b735b63a 100644 --- a/solution/3200-3299/3244.Shortest Distance After Road Addition Queries II/README_EN.md +++ b/solution/3200-3299/3244.Shortest Distance After Road Addition Queries II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3244.Shortest%20Distance%20After%20Road%20Addition%20Queries%20II/README_EN.md +rating: 2270 +source: Weekly Contest 409 Q3 tags: - Greedy - Graph diff --git a/solution/3200-3299/3245.Alternating Groups III/README.md b/solution/3200-3299/3245.Alternating Groups III/README.md index 3ba6d8cbb92e0..cad895a192d60 100644 --- a/solution/3200-3299/3245.Alternating Groups III/README.md +++ b/solution/3200-3299/3245.Alternating Groups III/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3245.Alternating%20Groups%20III/README.md +rating: 3112 +source: 第 409 场周赛 Q4 tags: - 树状数组 - 数组 diff --git a/solution/3200-3299/3245.Alternating Groups III/README_EN.md b/solution/3200-3299/3245.Alternating Groups III/README_EN.md index b9e86ef79752e..fecfe3e31fa51 100644 --- a/solution/3200-3299/3245.Alternating Groups III/README_EN.md +++ b/solution/3200-3299/3245.Alternating Groups III/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3245.Alternating%20Groups%20III/README_EN.md +rating: 3112 +source: Weekly Contest 409 Q4 tags: - Binary Indexed Tree - Array diff --git a/solution/3200-3299/3248.Snake in Matrix/README.md b/solution/3200-3299/3248.Snake in Matrix/README.md index 321f12e83856b..88e9a4af84414 100644 --- a/solution/3200-3299/3248.Snake in Matrix/README.md +++ b/solution/3200-3299/3248.Snake in Matrix/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3248.Snake%20in%20Matrix/README.md +rating: 1171 +source: 第 410 场周赛 Q1 tags: - 数组 - 字符串 diff --git a/solution/3200-3299/3248.Snake in Matrix/README_EN.md b/solution/3200-3299/3248.Snake in Matrix/README_EN.md index 4973a21485aa5..c3583d8d97c2a 100644 --- a/solution/3200-3299/3248.Snake in Matrix/README_EN.md +++ b/solution/3200-3299/3248.Snake in Matrix/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3248.Snake%20in%20Matrix/README_EN.md +rating: 1171 +source: Weekly Contest 410 Q1 tags: - Array - String diff --git a/solution/3200-3299/3249.Count the Number of Good Nodes/README.md b/solution/3200-3299/3249.Count the Number of Good Nodes/README.md index ec3b3f0a8b8cc..cbd854485cbb8 100644 --- a/solution/3200-3299/3249.Count the Number of Good Nodes/README.md +++ b/solution/3200-3299/3249.Count the Number of Good Nodes/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3249.Count%20the%20Number%20of%20Good%20Nodes/README.md +rating: 1565 +source: 第 410 场周赛 Q2 tags: - 树 - 深度优先搜索 diff --git a/solution/3200-3299/3249.Count the Number of Good Nodes/README_EN.md b/solution/3200-3299/3249.Count the Number of Good Nodes/README_EN.md index c2a8453e40fe8..572f31e278da8 100644 --- a/solution/3200-3299/3249.Count the Number of Good Nodes/README_EN.md +++ b/solution/3200-3299/3249.Count the Number of Good Nodes/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3249.Count%20the%20Number%20of%20Good%20Nodes/README_EN.md +rating: 1565 +source: Weekly Contest 410 Q2 tags: - Tree - Depth-First Search diff --git a/solution/3200-3299/3250.Find the Count of Monotonic Pairs I/README.md b/solution/3200-3299/3250.Find the Count of Monotonic Pairs I/README.md index 64fc72f3f4772..eddce04097b18 100644 --- a/solution/3200-3299/3250.Find the Count of Monotonic Pairs I/README.md +++ b/solution/3200-3299/3250.Find the Count of Monotonic Pairs I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3250.Find%20the%20Count%20of%20Monotonic%20Pairs%20I/README.md +rating: 1897 +source: 第 410 场周赛 Q3 tags: - 数组 - 数学 diff --git a/solution/3200-3299/3250.Find the Count of Monotonic Pairs I/README_EN.md b/solution/3200-3299/3250.Find the Count of Monotonic Pairs I/README_EN.md index b0bdb02e099a6..bfb7bd08fbb4a 100644 --- a/solution/3200-3299/3250.Find the Count of Monotonic Pairs I/README_EN.md +++ b/solution/3200-3299/3250.Find the Count of Monotonic Pairs I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3250.Find%20the%20Count%20of%20Monotonic%20Pairs%20I/README_EN.md +rating: 1897 +source: Weekly Contest 410 Q3 tags: - Array - Math diff --git a/solution/3200-3299/3251.Find the Count of Monotonic Pairs II/README.md b/solution/3200-3299/3251.Find the Count of Monotonic Pairs II/README.md index 75da825a398e5..fc966ed818b6c 100644 --- a/solution/3200-3299/3251.Find the Count of Monotonic Pairs II/README.md +++ b/solution/3200-3299/3251.Find the Count of Monotonic Pairs II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3251.Find%20the%20Count%20of%20Monotonic%20Pairs%20II/README.md +rating: 2323 +source: 第 410 场周赛 Q4 tags: - 数组 - 数学 diff --git a/solution/3200-3299/3251.Find the Count of Monotonic Pairs II/README_EN.md b/solution/3200-3299/3251.Find the Count of Monotonic Pairs II/README_EN.md index 9eed6d2d9fb0f..d01ba27abed45 100644 --- a/solution/3200-3299/3251.Find the Count of Monotonic Pairs II/README_EN.md +++ b/solution/3200-3299/3251.Find the Count of Monotonic Pairs II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3251.Find%20the%20Count%20of%20Monotonic%20Pairs%20II/README_EN.md +rating: 2323 +source: Weekly Contest 410 Q4 tags: - Array - Math diff --git a/solution/3200-3299/3254.Find the Power of K-Size Subarrays I/README.md b/solution/3200-3299/3254.Find the Power of K-Size Subarrays I/README.md index 5e0ed741c9664..05edba1805f28 100644 --- a/solution/3200-3299/3254.Find the Power of K-Size Subarrays I/README.md +++ b/solution/3200-3299/3254.Find the Power of K-Size Subarrays I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3254.Find%20the%20Power%20of%20K-Size%20Subarrays%20I/README.md +rating: 1266 +source: 第 137 场双周赛 Q1 tags: - 数组 - 滑动窗口 diff --git a/solution/3200-3299/3254.Find the Power of K-Size Subarrays I/README_EN.md b/solution/3200-3299/3254.Find the Power of K-Size Subarrays I/README_EN.md index d14f9690c0677..4c2a7c8a7d69c 100644 --- a/solution/3200-3299/3254.Find the Power of K-Size Subarrays I/README_EN.md +++ b/solution/3200-3299/3254.Find the Power of K-Size Subarrays I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3254.Find%20the%20Power%20of%20K-Size%20Subarrays%20I/README_EN.md +rating: 1266 +source: Biweekly Contest 137 Q1 tags: - Array - Sliding Window diff --git a/solution/3200-3299/3255.Find the Power of K-Size Subarrays II/README.md b/solution/3200-3299/3255.Find the Power of K-Size Subarrays II/README.md index 422c9cc3b87bd..3d2a957f6bad5 100644 --- a/solution/3200-3299/3255.Find the Power of K-Size Subarrays II/README.md +++ b/solution/3200-3299/3255.Find the Power of K-Size Subarrays II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3255.Find%20the%20Power%20of%20K-Size%20Subarrays%20II/README.md +rating: 1595 +source: 第 137 场双周赛 Q2 tags: - 数组 - 滑动窗口 diff --git a/solution/3200-3299/3255.Find the Power of K-Size Subarrays II/README_EN.md b/solution/3200-3299/3255.Find the Power of K-Size Subarrays II/README_EN.md index 88568b364fafa..bef378c1b5409 100644 --- a/solution/3200-3299/3255.Find the Power of K-Size Subarrays II/README_EN.md +++ b/solution/3200-3299/3255.Find the Power of K-Size Subarrays II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3255.Find%20the%20Power%20of%20K-Size%20Subarrays%20II/README_EN.md +rating: 1595 +source: Biweekly Contest 137 Q2 tags: - Array - Sliding Window diff --git a/solution/3200-3299/3256.Maximum Value Sum by Placing Three Rooks I/README.md b/solution/3200-3299/3256.Maximum Value Sum by Placing Three Rooks I/README.md index f6cfac2c53ddf..c6d262168d37b 100644 --- a/solution/3200-3299/3256.Maximum Value Sum by Placing Three Rooks I/README.md +++ b/solution/3200-3299/3256.Maximum Value Sum by Placing Three Rooks I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3256.Maximum%20Value%20Sum%20by%20Placing%20Three%20Rooks%20I/README.md +rating: 2262 +source: 第 137 场双周赛 Q3 tags: - 数组 - 动态规划 diff --git a/solution/3200-3299/3256.Maximum Value Sum by Placing Three Rooks I/README_EN.md b/solution/3200-3299/3256.Maximum Value Sum by Placing Three Rooks I/README_EN.md index 019630a4cf3c4..e51c6ed2c0c54 100644 --- a/solution/3200-3299/3256.Maximum Value Sum by Placing Three Rooks I/README_EN.md +++ b/solution/3200-3299/3256.Maximum Value Sum by Placing Three Rooks I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3256.Maximum%20Value%20Sum%20by%20Placing%20Three%20Rooks%20I/README_EN.md +rating: 2262 +source: Biweekly Contest 137 Q3 tags: - Array - Dynamic Programming diff --git a/solution/3200-3299/3257.Maximum Value Sum by Placing Three Rooks II/README.md b/solution/3200-3299/3257.Maximum Value Sum by Placing Three Rooks II/README.md index 7085075b244d8..28461ce6a6232 100644 --- a/solution/3200-3299/3257.Maximum Value Sum by Placing Three Rooks II/README.md +++ b/solution/3200-3299/3257.Maximum Value Sum by Placing Three Rooks II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3257.Maximum%20Value%20Sum%20by%20Placing%20Three%20Rooks%20II/README.md +rating: 2553 +source: 第 137 场双周赛 Q4 tags: - 数组 - 动态规划 diff --git a/solution/3200-3299/3257.Maximum Value Sum by Placing Three Rooks II/README_EN.md b/solution/3200-3299/3257.Maximum Value Sum by Placing Three Rooks II/README_EN.md index 8df098939619b..3ca6969ebaafa 100644 --- a/solution/3200-3299/3257.Maximum Value Sum by Placing Three Rooks II/README_EN.md +++ b/solution/3200-3299/3257.Maximum Value Sum by Placing Three Rooks II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3257.Maximum%20Value%20Sum%20by%20Placing%20Three%20Rooks%20II/README_EN.md +rating: 2553 +source: Biweekly Contest 137 Q4 tags: - Array - Dynamic Programming diff --git a/solution/3200-3299/3258.Count Substrings That Satisfy K-Constraint I/README.md b/solution/3200-3299/3258.Count Substrings That Satisfy K-Constraint I/README.md index 23858ac32a0a7..1364d8ed9ce0c 100644 --- a/solution/3200-3299/3258.Count Substrings That Satisfy K-Constraint I/README.md +++ b/solution/3200-3299/3258.Count Substrings That Satisfy K-Constraint I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3258.Count%20Substrings%20That%20Satisfy%20K-Constraint%20I/README.md +rating: 1258 +source: 第 411 场周赛 Q1 tags: - 字符串 - 滑动窗口 diff --git a/solution/3200-3299/3258.Count Substrings That Satisfy K-Constraint I/README_EN.md b/solution/3200-3299/3258.Count Substrings That Satisfy K-Constraint I/README_EN.md index b307a649978fe..2299434d843da 100644 --- a/solution/3200-3299/3258.Count Substrings That Satisfy K-Constraint I/README_EN.md +++ b/solution/3200-3299/3258.Count Substrings That Satisfy K-Constraint I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3258.Count%20Substrings%20That%20Satisfy%20K-Constraint%20I/README_EN.md +rating: 1258 +source: Weekly Contest 411 Q1 tags: - String - Sliding Window diff --git a/solution/3200-3299/3259.Maximum Energy Boost From Two Drinks/README.md b/solution/3200-3299/3259.Maximum Energy Boost From Two Drinks/README.md index f3dd8d9e8023e..6b1d9aeb3b947 100644 --- a/solution/3200-3299/3259.Maximum Energy Boost From Two Drinks/README.md +++ b/solution/3200-3299/3259.Maximum Energy Boost From Two Drinks/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3259.Maximum%20Energy%20Boost%20From%20Two%20Drinks/README.md +rating: 1483 +source: 第 411 场周赛 Q2 tags: - 数组 - 动态规划 diff --git a/solution/3200-3299/3259.Maximum Energy Boost From Two Drinks/README_EN.md b/solution/3200-3299/3259.Maximum Energy Boost From Two Drinks/README_EN.md index 1a78c451360a3..229cf29a32b41 100644 --- a/solution/3200-3299/3259.Maximum Energy Boost From Two Drinks/README_EN.md +++ b/solution/3200-3299/3259.Maximum Energy Boost From Two Drinks/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3259.Maximum%20Energy%20Boost%20From%20Two%20Drinks/README_EN.md +rating: 1483 +source: Weekly Contest 411 Q2 tags: - Array - Dynamic Programming diff --git a/solution/3200-3299/3260.Find the Largest Palindrome Divisible by K/README.md b/solution/3200-3299/3260.Find the Largest Palindrome Divisible by K/README.md index 7e841a3a1cd07..40c716b735c47 100644 --- a/solution/3200-3299/3260.Find the Largest Palindrome Divisible by K/README.md +++ b/solution/3200-3299/3260.Find the Largest Palindrome Divisible by K/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3260.Find%20the%20Largest%20Palindrome%20Divisible%20by%20K/README.md +rating: 2370 +source: 第 411 场周赛 Q3 tags: - 贪心 - 数学 diff --git a/solution/3200-3299/3260.Find the Largest Palindrome Divisible by K/README_EN.md b/solution/3200-3299/3260.Find the Largest Palindrome Divisible by K/README_EN.md index c66da0f3ff631..12e087829bda6 100644 --- a/solution/3200-3299/3260.Find the Largest Palindrome Divisible by K/README_EN.md +++ b/solution/3200-3299/3260.Find the Largest Palindrome Divisible by K/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3260.Find%20the%20Largest%20Palindrome%20Divisible%20by%20K/README_EN.md +rating: 2370 +source: Weekly Contest 411 Q3 tags: - Greedy - Math diff --git a/solution/3200-3299/3261.Count Substrings That Satisfy K-Constraint II/README.md b/solution/3200-3299/3261.Count Substrings That Satisfy K-Constraint II/README.md index 395d723ee3f9d..052df1d9b8ac0 100644 --- a/solution/3200-3299/3261.Count Substrings That Satisfy K-Constraint II/README.md +++ b/solution/3200-3299/3261.Count Substrings That Satisfy K-Constraint II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3261.Count%20Substrings%20That%20Satisfy%20K-Constraint%20II/README.md +rating: 2658 +source: 第 411 场周赛 Q4 tags: - 数组 - 字符串 diff --git a/solution/3200-3299/3261.Count Substrings That Satisfy K-Constraint II/README_EN.md b/solution/3200-3299/3261.Count Substrings That Satisfy K-Constraint II/README_EN.md index 5e6192606234e..19be3a66efeba 100644 --- a/solution/3200-3299/3261.Count Substrings That Satisfy K-Constraint II/README_EN.md +++ b/solution/3200-3299/3261.Count Substrings That Satisfy K-Constraint II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3261.Count%20Substrings%20That%20Satisfy%20K-Constraint%20II/README_EN.md +rating: 2658 +source: Weekly Contest 411 Q4 tags: - Array - String diff --git a/solution/3200-3299/3268.Find Overlapping Shifts II/README.md b/solution/3200-3299/3268.Find Overlapping Shifts II/README.md new file mode 100644 index 0000000000000..66118275f3916 --- /dev/null +++ b/solution/3200-3299/3268.Find Overlapping Shifts II/README.md @@ -0,0 +1,183 @@ +--- +comments: true +difficulty: 困难 +edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README.md +tags: + - 数据库 +--- + + + +# [3268. Find Overlapping Shifts II 🔒](https://leetcode.cn/problems/find-overlapping-shifts-ii) + +[English Version](/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README_EN.md) + +## 题目描述 + + + +

Table: EmployeeShifts

+ +
++------------------+----------+
+| Column Name      | Type     |
++------------------+----------+
+| employee_id      | int      |
+| start_time       | datetime |
+| end_time         | datetime |
++------------------+----------+
+(employee_id, start_time) is the unique key for this table.
+This table contains information about the shifts worked by employees, including the start time, and end time.
+
+ +

Write a solution to analyze overlapping shifts for each employee. Two shifts are considered overlapping if they occur on the same date and one shift's end_time is later than another shift's start_time.

+ +

For each employee, calculate the following:

+ +
    +
  1. The maximum number of shifts that overlap at any given time.
  2. +
  3. The total duration of all overlaps in minutes.
  4. +
+ +

Return the result table ordered by employee_id in ascending order.

+ +

The query result format is in the following example.

+ +

 

+

Example:

+ +
+

Input:

+ +

EmployeeShifts table:

+ +
++-------------+---------------------+---------------------+
+| employee_id | start_time          | end_time            |
++-------------+---------------------+---------------------+
+| 1           | 2023-10-01 09:00:00 | 2023-10-01 17:00:00 |
+| 1           | 2023-10-01 15:00:00 | 2023-10-01 23:00:00 |
+| 1           | 2023-10-01 16:00:00 | 2023-10-02 00:00:00 |
+| 2           | 2023-10-01 09:00:00 | 2023-10-01 17:00:00 |
+| 2           | 2023-10-01 11:00:00 | 2023-10-01 19:00:00 |
+| 3           | 2023-10-01 09:00:00 | 2023-10-01 17:00:00 |
++-------------+---------------------+---------------------+
+
+ +

Output:

+ +
++-------------+---------------------------+------------------------+
+| employee_id | max_overlapping_shifts    | total_overlap_duration |
++-------------+---------------------------+------------------------+
+| 1           | 3                         | 600                    |
+| 2           | 2                         | 360                    |
+| 3           | 1                         | 0                      |
++-------------+---------------------------+------------------------+
+
+ +

Explanation:

+ + + +

The output table contains the employee_id, the maximum number of simultaneous overlaps, and the total overlap duration in minutes for each employee, ordered by employee_id in ascending order.

+
+ + + +## 解法 + + + +### 方法一:合并 + 连接 + +我们可以将所有 `employee_id` 的 `start_time` 和 `end_time` 合并到一起,记录在 `T` 表中,然后使用 `LEAD` 函数计算出每个 `employee_id` 的下一个时间段,记录在 `P` 表中。 + +接着,我们可以通过 `P` 表和 `EmployeeShifts` 表进行连接,计算出每个 `employee_id` 的 `concurrent_count`,即同时存在的时间段数量,记录在 `S` 表中。 + +最后,我们可以通过 `EmployeeShifts` 表和自身进行连接,计算出每个 `employee_id` 的 `total_overlap_duration`,即总的重叠时间,记录在 `U` 表中。 + +最终,我们可以通过 `S` 表和 `U` 表进行连接,计算出每个 `employee_id` 的 `max_overlapping_shifts` 和 `total_overlap_duration`。 + +相似题目: + +- [3156. 员工任务持续时间和并发任务 🔒](https://github.com/doocs/leetcode/blob/main/solution/3100-3199/3156.Employee%20Task%20Duration%20and%20Concurrent%20Tasks/README.md) +- [3262. 查找重叠的班次 🔒](https://github.com/doocs/leetcode/blob/main/solution/3200-3299/3262.Find%20Overlapping%20Shifts/README.md) + + + +#### MySQL + +```sql +WITH + T AS ( + SELECT DISTINCT employee_id, start_time AS st + FROM EmployeeShifts + UNION DISTINCT + SELECT DISTINCT employee_id, end_time AS st + FROM EmployeeShifts + ), + P AS ( + SELECT + *, + LEAD(st) OVER ( + PARTITION BY employee_id + ORDER BY st + ) AS ed + FROM T + ), + S AS ( + SELECT + P.*, + COUNT(1) AS concurrent_count + FROM + P + INNER JOIN EmployeeShifts USING (employee_id) + WHERE P.st >= EmployeeShifts.start_time AND P.ed <= EmployeeShifts.end_time + GROUP BY 1, 2, 3 + ), + U AS ( + SELECT + t1.employee_id, + SUM( + TIMESTAMPDIFF(MINUTE, t2.start_time, LEAST(t1.end_time, t2.end_time)) + ) total_overlap_duration + FROM + EmployeeShifts t1 + JOIN EmployeeShifts t2 + ON t1.employee_id = t2.employee_id + AND t1.start_time < t2.start_time + AND t1.end_time > t2.start_time + GROUP BY 1 + ) +SELECT + employee_id, + MAX(concurrent_count) max_overlapping_shifts, + IFNULL(AVG(total_overlap_duration), 0) total_overlap_duration +FROM + S + LEFT JOIN U USING (employee_id) +GROUP BY 1 +ORDER BY 1; +``` + + + + + + diff --git a/solution/3200-3299/3268.Find Overlapping Shifts II/README_EN.md b/solution/3200-3299/3268.Find Overlapping Shifts II/README_EN.md new file mode 100644 index 0000000000000..f319d63003b66 --- /dev/null +++ b/solution/3200-3299/3268.Find Overlapping Shifts II/README_EN.md @@ -0,0 +1,183 @@ +--- +comments: true +difficulty: Hard +edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README_EN.md +tags: + - Database +--- + + + +# [3268. Find Overlapping Shifts II 🔒](https://leetcode.com/problems/find-overlapping-shifts-ii) + +[中文文档](/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README.md) + +## Description + + + +

Table: EmployeeShifts

+ +
++------------------+----------+
+| Column Name      | Type     |
++------------------+----------+
+| employee_id      | int      |
+| start_time       | datetime |
+| end_time         | datetime |
++------------------+----------+
+(employee_id, start_time) is the unique key for this table.
+This table contains information about the shifts worked by employees, including the start time, and end time.
+
+ +

Write a solution to analyze overlapping shifts for each employee. Two shifts are considered overlapping if they occur on the same date and one shift's end_time is later than another shift's start_time.

+ +

For each employee, calculate the following:

+ +
    +
  1. The maximum number of shifts that overlap at any given time.
  2. +
  3. The total duration of all overlaps in minutes.
  4. +
+ +

Return the result table ordered by employee_id in ascending order.

+ +

The query result format is in the following example.

+ +

 

+

Example:

+ +
+

Input:

+ +

EmployeeShifts table:

+ +
++-------------+---------------------+---------------------+
+| employee_id | start_time          | end_time            |
++-------------+---------------------+---------------------+
+| 1           | 2023-10-01 09:00:00 | 2023-10-01 17:00:00 |
+| 1           | 2023-10-01 15:00:00 | 2023-10-01 23:00:00 |
+| 1           | 2023-10-01 16:00:00 | 2023-10-02 00:00:00 |
+| 2           | 2023-10-01 09:00:00 | 2023-10-01 17:00:00 |
+| 2           | 2023-10-01 11:00:00 | 2023-10-01 19:00:00 |
+| 3           | 2023-10-01 09:00:00 | 2023-10-01 17:00:00 |
++-------------+---------------------+---------------------+
+
+ +

Output:

+ +
++-------------+---------------------------+------------------------+
+| employee_id | max_overlapping_shifts    | total_overlap_duration |
++-------------+---------------------------+------------------------+
+| 1           | 3                         | 600                    |
+| 2           | 2                         | 360                    |
+| 3           | 1                         | 0                      |
++-------------+---------------------------+------------------------+
+
+ +

Explanation:

+ + + +

The output table contains the employee_id, the maximum number of simultaneous overlaps, and the total overlap duration in minutes for each employee, ordered by employee_id in ascending order.

+
+ + + +## Solutions + + + +### Solution 1: Merge + Join + +We can merge all the `start_time` and `end_time` for each `employee_id` and store them in table `T`. Then, by using the `LEAD` function, we calculate the next time period for each `employee_id` and store it in table `P`. + +Next, we can join table `P` with the `EmployeeShifts` table to calculate the `concurrent_count` for each `employee_id`, which represents the number of overlapping time periods. This is stored in table `S`. + +Finally, we can perform a self-join on the `EmployeeShifts` table to calculate the `total_overlap_duration` for each `employee_id`, representing the total overlapping time, and store it in table `U`. + +Ultimately, we can join tables `S` and `U` to calculate the `max_overlapping_shifts` and `total_overlap_duration` for each `employee_id`. + +Similar Problems: + +- [3156. Employee Task Duration and Concurrent Tasks 🔒](https://github.com/doocs/leetcode/blob/main/solution/3100-3199/3156.Employee%20Task%20Duration%20and%20Concurrent%20Tasks/README_EN.md) +- [3262. Find Overlapping Shifts 🔒](https://github.com/doocs/leetcode/blob/main/solution/3200-3299/3262.Find%20Overlapping%20Shifts/README_EN.md) + + + +#### MySQL + +```sql +WITH + T AS ( + SELECT DISTINCT employee_id, start_time AS st + FROM EmployeeShifts + UNION DISTINCT + SELECT DISTINCT employee_id, end_time AS st + FROM EmployeeShifts + ), + P AS ( + SELECT + *, + LEAD(st) OVER ( + PARTITION BY employee_id + ORDER BY st + ) AS ed + FROM T + ), + S AS ( + SELECT + P.*, + COUNT(1) AS concurrent_count + FROM + P + INNER JOIN EmployeeShifts USING (employee_id) + WHERE P.st >= EmployeeShifts.start_time AND P.ed <= EmployeeShifts.end_time + GROUP BY 1, 2, 3 + ), + U AS ( + SELECT + t1.employee_id, + SUM( + TIMESTAMPDIFF(MINUTE, t2.start_time, LEAST(t1.end_time, t2.end_time)) + ) total_overlap_duration + FROM + EmployeeShifts t1 + JOIN EmployeeShifts t2 + ON t1.employee_id = t2.employee_id + AND t1.start_time < t2.start_time + AND t1.end_time > t2.start_time + GROUP BY 1 + ) +SELECT + employee_id, + MAX(concurrent_count) max_overlapping_shifts, + IFNULL(AVG(total_overlap_duration), 0) total_overlap_duration +FROM + S + LEFT JOIN U USING (employee_id) +GROUP BY 1 +ORDER BY 1; +``` + + + + + + diff --git a/solution/3200-3299/3268.Find Overlapping Shifts II/Solution.sql b/solution/3200-3299/3268.Find Overlapping Shifts II/Solution.sql new file mode 100644 index 0000000000000..3f6f98dbb4092 --- /dev/null +++ b/solution/3200-3299/3268.Find Overlapping Shifts II/Solution.sql @@ -0,0 +1,50 @@ +WITH + T AS ( + SELECT DISTINCT employee_id, start_time AS st + FROM EmployeeShifts + UNION DISTINCT + SELECT DISTINCT employee_id, end_time AS st + FROM EmployeeShifts + ), + P AS ( + SELECT + *, + LEAD(st) OVER ( + PARTITION BY employee_id + ORDER BY st + ) AS ed + FROM T + ), + S AS ( + SELECT + P.*, + COUNT(1) AS concurrent_count + FROM + P + INNER JOIN EmployeeShifts USING (employee_id) + WHERE P.st >= EmployeeShifts.start_time AND P.ed <= EmployeeShifts.end_time + GROUP BY 1, 2, 3 + ), + U AS ( + SELECT + t1.employee_id, + SUM( + TIMESTAMPDIFF(MINUTE, t2.start_time, LEAST(t1.end_time, t2.end_time)) + ) total_overlap_duration + FROM + EmployeeShifts t1 + JOIN EmployeeShifts t2 + ON t1.employee_id = t2.employee_id + AND t1.start_time < t2.start_time + AND t1.end_time > t2.start_time + GROUP BY 1 + ) +SELECT + employee_id, + MAX(concurrent_count) max_overlapping_shifts, + IFNULL(AVG(total_overlap_duration), 0) total_overlap_duration +FROM + S + LEFT JOIN U USING (employee_id) +GROUP BY 1 +ORDER BY 1; diff --git a/solution/DATABASE_README.md b/solution/DATABASE_README.md index d2e967ef985fe..816039b9e7a0b 100644 --- a/solution/DATABASE_README.md +++ b/solution/DATABASE_README.md @@ -293,6 +293,7 @@ | 3246 | [英超积分榜排名](/solution/3200-3299/3246.Premier%20League%20Table%20Ranking/README.md) | `数据库` | 简单 | 🔒 | | 3252 | [英超积分榜排名 II](/solution/3200-3299/3252.Premier%20League%20Table%20Ranking%20II/README.md) | `数据库` | 中等 | 🔒 | | 3262 | [查找重叠的班次](/solution/3200-3299/3262.Find%20Overlapping%20Shifts/README.md) | | 中等 | 🔒 | +| 3268 | [Find Overlapping Shifts II](/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README.md) | | 困难 | 🔒 | ## 版权 diff --git a/solution/DATABASE_README_EN.md b/solution/DATABASE_README_EN.md index efacdc1632f09..c62399917d91c 100644 --- a/solution/DATABASE_README_EN.md +++ b/solution/DATABASE_README_EN.md @@ -291,6 +291,7 @@ Press Control + F(or Command + F on | 3246 | [Premier League Table Ranking](/solution/3200-3299/3246.Premier%20League%20Table%20Ranking/README_EN.md) | `Database` | Easy | 🔒 | | 3252 | [Premier League Table Ranking II](/solution/3200-3299/3252.Premier%20League%20Table%20Ranking%20II/README_EN.md) | `Database` | Medium | 🔒 | | 3262 | [Find Overlapping Shifts](/solution/3200-3299/3262.Find%20Overlapping%20Shifts/README_EN.md) | | Medium | 🔒 | +| 3268 | [Find Overlapping Shifts II](/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README_EN.md) | | Hard | 🔒 | ## Copyright diff --git a/solution/README.md b/solution/README.md index 109382a9b0244..38ab783287067 100644 --- a/solution/README.md +++ b/solution/README.md @@ -3278,6 +3278,7 @@ | 3265 | [统计近似相等数对 I](/solution/3200-3299/3265.Count%20Almost%20Equal%20Pairs%20I/README.md) | | 中等 | 第 412 场周赛 | | 3266 | [K 次乘运算后的最终数组 II](/solution/3200-3299/3266.Final%20Array%20State%20After%20K%20Multiplication%20Operations%20II/README.md) | | 困难 | 第 412 场周赛 | | 3267 | [统计近似相等数对 II](/solution/3200-3299/3267.Count%20Almost%20Equal%20Pairs%20II/README.md) | | 困难 | 第 412 场周赛 | +| 3268 | [Find Overlapping Shifts II](/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README.md) | | 困难 | 🔒 | ## 版权 diff --git a/solution/README_EN.md b/solution/README_EN.md index 661310a6f440c..a9f6dbcb4f6b9 100644 --- a/solution/README_EN.md +++ b/solution/README_EN.md @@ -3276,6 +3276,7 @@ Press Control + F(or Command + F on | 3265 | [Count Almost Equal Pairs I](/solution/3200-3299/3265.Count%20Almost%20Equal%20Pairs%20I/README_EN.md) | | Medium | Weekly Contest 412 | | 3266 | [Final Array State After K Multiplication Operations II](/solution/3200-3299/3266.Final%20Array%20State%20After%20K%20Multiplication%20Operations%20II/README_EN.md) | | Hard | Weekly Contest 412 | | 3267 | [Count Almost Equal Pairs II](/solution/3200-3299/3267.Count%20Almost%20Equal%20Pairs%20II/README_EN.md) | | Hard | Weekly Contest 412 | +| 3268 | [Find Overlapping Shifts II](/solution/3200-3299/3268.Find%20Overlapping%20Shifts%20II/README_EN.md) | | Hard | 🔒 | ## Copyright