diff --git a/solution/3300-3399/3300.Minimum Element After Replacement With Digit Sum/README.md b/solution/3300-3399/3300.Minimum Element After Replacement With Digit Sum/README.md index 08b71be95dc0a..356a653a644e2 100644 --- a/solution/3300-3399/3300.Minimum Element After Replacement With Digit Sum/README.md +++ b/solution/3300-3399/3300.Minimum Element After Replacement With Digit Sum/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3300.Minimum%20Element%20After%20Replacement%20With%20Digit%20Sum/README.md +rating: 1181 +source: 第 140 场双周赛 Q1 tags: - 数组 - 数学 diff --git a/solution/3300-3399/3300.Minimum Element After Replacement With Digit Sum/README_EN.md b/solution/3300-3399/3300.Minimum Element After Replacement With Digit Sum/README_EN.md index 1648c530afb36..6b730deca9d6c 100644 --- a/solution/3300-3399/3300.Minimum Element After Replacement With Digit Sum/README_EN.md +++ b/solution/3300-3399/3300.Minimum Element After Replacement With Digit Sum/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3300.Minimum%20Element%20After%20Replacement%20With%20Digit%20Sum/README_EN.md +rating: 1181 +source: Biweekly Contest 140 Q1 tags: - Array - Math diff --git a/solution/3300-3399/3301.Maximize the Total Height of Unique Towers/README.md b/solution/3300-3399/3301.Maximize the Total Height of Unique Towers/README.md index e9eefa1b8ccf2..9432d2b08cdfd 100644 --- a/solution/3300-3399/3301.Maximize the Total Height of Unique Towers/README.md +++ b/solution/3300-3399/3301.Maximize the Total Height of Unique Towers/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3301.Maximize%20the%20Total%20Height%20of%20Unique%20Towers/README.md +rating: 1448 +source: 第 140 场双周赛 Q2 tags: - 贪心 - 数组 diff --git a/solution/3300-3399/3301.Maximize the Total Height of Unique Towers/README_EN.md b/solution/3300-3399/3301.Maximize the Total Height of Unique Towers/README_EN.md index 3d16aff13c249..b516234fb2862 100644 --- a/solution/3300-3399/3301.Maximize the Total Height of Unique Towers/README_EN.md +++ b/solution/3300-3399/3301.Maximize the Total Height of Unique Towers/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3301.Maximize%20the%20Total%20Height%20of%20Unique%20Towers/README_EN.md +rating: 1448 +source: Biweekly Contest 140 Q2 tags: - Greedy - Array diff --git a/solution/3300-3399/3302.Find the Lexicographically Smallest Valid Sequence/README.md b/solution/3300-3399/3302.Find the Lexicographically Smallest Valid Sequence/README.md index f7a252badfdb1..dc6aca161b065 100644 --- a/solution/3300-3399/3302.Find the Lexicographically Smallest Valid Sequence/README.md +++ b/solution/3300-3399/3302.Find the Lexicographically Smallest Valid Sequence/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3302.Find%20the%20Lexicographically%20Smallest%20Valid%20Sequence/README.md +rating: 2473 +source: 第 140 场双周赛 Q3 tags: - 贪心 - 双指针 diff --git a/solution/3300-3399/3302.Find the Lexicographically Smallest Valid Sequence/README_EN.md b/solution/3300-3399/3302.Find the Lexicographically Smallest Valid Sequence/README_EN.md index 67678d2d9c8a6..066dfffe10e12 100644 --- a/solution/3300-3399/3302.Find the Lexicographically Smallest Valid Sequence/README_EN.md +++ b/solution/3300-3399/3302.Find the Lexicographically Smallest Valid Sequence/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3302.Find%20the%20Lexicographically%20Smallest%20Valid%20Sequence/README_EN.md +rating: 2473 +source: Biweekly Contest 140 Q3 tags: - Greedy - Two Pointers diff --git a/solution/3300-3399/3303.Find the Occurrence of First Almost Equal Substring/README.md b/solution/3300-3399/3303.Find the Occurrence of First Almost Equal Substring/README.md index 65a8e2ca1843f..7a8854d6017df 100644 --- a/solution/3300-3399/3303.Find the Occurrence of First Almost Equal Substring/README.md +++ b/solution/3300-3399/3303.Find the Occurrence of First Almost Equal Substring/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3303.Find%20the%20Occurrence%20of%20First%20Almost%20Equal%20Substring/README.md +rating: 2509 +source: 第 140 场双周赛 Q4 tags: - 字符串 - 字符串匹配 diff --git a/solution/3300-3399/3303.Find the Occurrence of First Almost Equal Substring/README_EN.md b/solution/3300-3399/3303.Find the Occurrence of First Almost Equal Substring/README_EN.md index f71839f655b38..f53c65671e1dd 100644 --- a/solution/3300-3399/3303.Find the Occurrence of First Almost Equal Substring/README_EN.md +++ b/solution/3300-3399/3303.Find the Occurrence of First Almost Equal Substring/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3303.Find%20the%20Occurrence%20of%20First%20Almost%20Equal%20Substring/README_EN.md +rating: 2509 +source: Biweekly Contest 140 Q4 tags: - String - String Matching diff --git a/solution/3300-3399/3304.Find the K-th Character in String Game I/README.md b/solution/3300-3399/3304.Find the K-th Character in String Game I/README.md index a50f1951d0652..1fd83b1df8404 100644 --- a/solution/3300-3399/3304.Find the K-th Character in String Game I/README.md +++ b/solution/3300-3399/3304.Find the K-th Character in String Game I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3304.Find%20the%20K-th%20Character%20in%20String%20Game%20I/README.md +rating: 1288 +source: 第 417 场周赛 Q1 tags: - 位运算 - 递归 diff --git a/solution/3300-3399/3304.Find the K-th Character in String Game I/README_EN.md b/solution/3300-3399/3304.Find the K-th Character in String Game I/README_EN.md index 06856a43134a3..939cfd227d1d8 100644 --- a/solution/3300-3399/3304.Find the K-th Character in String Game I/README_EN.md +++ b/solution/3300-3399/3304.Find the K-th Character in String Game I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3304.Find%20the%20K-th%20Character%20in%20String%20Game%20I/README_EN.md +rating: 1288 +source: Weekly Contest 417 Q1 tags: - Bit Manipulation - Recursion diff --git a/solution/3300-3399/3305.Count of Substrings Containing Every Vowel and K Consonants I/README.md b/solution/3300-3399/3305.Count of Substrings Containing Every Vowel and K Consonants I/README.md index 91a70fbc09f85..7c83260a49fac 100644 --- a/solution/3300-3399/3305.Count of Substrings Containing Every Vowel and K Consonants I/README.md +++ b/solution/3300-3399/3305.Count of Substrings Containing Every Vowel and K Consonants I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3305.Count%20of%20Substrings%20Containing%20Every%20Vowel%20and%20K%20Consonants%20I/README.md +rating: 1563 +source: 第 417 场周赛 Q2 tags: - 哈希表 - 字符串 diff --git a/solution/3300-3399/3305.Count of Substrings Containing Every Vowel and K Consonants I/README_EN.md b/solution/3300-3399/3305.Count of Substrings Containing Every Vowel and K Consonants I/README_EN.md index f0f4c0a13d96a..598811e3ce166 100644 --- a/solution/3300-3399/3305.Count of Substrings Containing Every Vowel and K Consonants I/README_EN.md +++ b/solution/3300-3399/3305.Count of Substrings Containing Every Vowel and K Consonants I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3305.Count%20of%20Substrings%20Containing%20Every%20Vowel%20and%20K%20Consonants%20I/README_EN.md +rating: 1563 +source: Weekly Contest 417 Q2 tags: - Hash Table - String diff --git a/solution/3300-3399/3306.Count of Substrings Containing Every Vowel and K Consonants II/README.md b/solution/3300-3399/3306.Count of Substrings Containing Every Vowel and K Consonants II/README.md index 757f4c6b74ef9..b3ac427988c86 100644 --- a/solution/3300-3399/3306.Count of Substrings Containing Every Vowel and K Consonants II/README.md +++ b/solution/3300-3399/3306.Count of Substrings Containing Every Vowel and K Consonants II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3306.Count%20of%20Substrings%20Containing%20Every%20Vowel%20and%20K%20Consonants%20II/README.md +rating: 2200 +source: 第 417 场周赛 Q3 tags: - 哈希表 - 字符串 diff --git a/solution/3300-3399/3306.Count of Substrings Containing Every Vowel and K Consonants II/README_EN.md b/solution/3300-3399/3306.Count of Substrings Containing Every Vowel and K Consonants II/README_EN.md index 03075272f022d..7eebace7f697f 100644 --- a/solution/3300-3399/3306.Count of Substrings Containing Every Vowel and K Consonants II/README_EN.md +++ b/solution/3300-3399/3306.Count of Substrings Containing Every Vowel and K Consonants II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3306.Count%20of%20Substrings%20Containing%20Every%20Vowel%20and%20K%20Consonants%20II/README_EN.md +rating: 2200 +source: Weekly Contest 417 Q3 tags: - Hash Table - String diff --git a/solution/3300-3399/3307.Find the K-th Character in String Game II/README.md b/solution/3300-3399/3307.Find the K-th Character in String Game II/README.md index 13a95c0ded9a8..52d5b2cd7006f 100644 --- a/solution/3300-3399/3307.Find the K-th Character in String Game II/README.md +++ b/solution/3300-3399/3307.Find the K-th Character in String Game II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3307.Find%20the%20K-th%20Character%20in%20String%20Game%20II/README.md +rating: 2232 +source: 第 417 场周赛 Q4 tags: - 位运算 - 递归 diff --git a/solution/3300-3399/3307.Find the K-th Character in String Game II/README_EN.md b/solution/3300-3399/3307.Find the K-th Character in String Game II/README_EN.md index 8635d053b989e..cc462b29287a5 100644 --- a/solution/3300-3399/3307.Find the K-th Character in String Game II/README_EN.md +++ b/solution/3300-3399/3307.Find the K-th Character in String Game II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3307.Find%20the%20K-th%20Character%20in%20String%20Game%20II/README_EN.md +rating: 2232 +source: Weekly Contest 417 Q4 tags: - Bit Manipulation - Recursion diff --git a/solution/3300-3399/3309.Maximum Possible Number by Binary Concatenation/README.md b/solution/3300-3399/3309.Maximum Possible Number by Binary Concatenation/README.md index 9095d32d79051..2a97b3797bb09 100644 --- a/solution/3300-3399/3309.Maximum Possible Number by Binary Concatenation/README.md +++ b/solution/3300-3399/3309.Maximum Possible Number by Binary Concatenation/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3309.Maximum%20Possible%20Number%20by%20Binary%20Concatenation/README.md +rating: 1363 +source: 第 418 场周赛 Q1 tags: - 位运算 - 数组 diff --git a/solution/3300-3399/3309.Maximum Possible Number by Binary Concatenation/README_EN.md b/solution/3300-3399/3309.Maximum Possible Number by Binary Concatenation/README_EN.md index 13d7040540966..af5556ef6cbc7 100644 --- a/solution/3300-3399/3309.Maximum Possible Number by Binary Concatenation/README_EN.md +++ b/solution/3300-3399/3309.Maximum Possible Number by Binary Concatenation/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3309.Maximum%20Possible%20Number%20by%20Binary%20Concatenation/README_EN.md +rating: 1363 +source: Weekly Contest 418 Q1 tags: - Bit Manipulation - Array diff --git a/solution/3300-3399/3310.Remove Methods From Project/README.md b/solution/3300-3399/3310.Remove Methods From Project/README.md index e811825821432..7146246f7919c 100644 --- a/solution/3300-3399/3310.Remove Methods From Project/README.md +++ b/solution/3300-3399/3310.Remove Methods From Project/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3310.Remove%20Methods%20From%20Project/README.md +rating: 1710 +source: 第 418 场周赛 Q2 tags: - 深度优先搜索 - 广度优先搜索 diff --git a/solution/3300-3399/3310.Remove Methods From Project/README_EN.md b/solution/3300-3399/3310.Remove Methods From Project/README_EN.md index b7f0307a4c677..5990a503ec0d3 100644 --- a/solution/3300-3399/3310.Remove Methods From Project/README_EN.md +++ b/solution/3300-3399/3310.Remove Methods From Project/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3310.Remove%20Methods%20From%20Project/README_EN.md +rating: 1710 +source: Weekly Contest 418 Q2 tags: - Depth-First Search - Breadth-First Search diff --git a/solution/3300-3399/3311.Construct 2D Grid Matching Graph Layout/README.md b/solution/3300-3399/3311.Construct 2D Grid Matching Graph Layout/README.md index 72b6215ee8568..c6c61c8b3da6e 100644 --- a/solution/3300-3399/3311.Construct 2D Grid Matching Graph Layout/README.md +++ b/solution/3300-3399/3311.Construct 2D Grid Matching Graph Layout/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3311.Construct%202D%20Grid%20Matching%20Graph%20Layout/README.md +rating: 2664 +source: 第 418 场周赛 Q3 tags: - 图 - 数组 diff --git a/solution/3300-3399/3311.Construct 2D Grid Matching Graph Layout/README_EN.md b/solution/3300-3399/3311.Construct 2D Grid Matching Graph Layout/README_EN.md index 761a653e8bd97..08a84d1a5e873 100644 --- a/solution/3300-3399/3311.Construct 2D Grid Matching Graph Layout/README_EN.md +++ b/solution/3300-3399/3311.Construct 2D Grid Matching Graph Layout/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3311.Construct%202D%20Grid%20Matching%20Graph%20Layout/README_EN.md +rating: 2664 +source: Weekly Contest 418 Q3 tags: - Graph - Array diff --git a/solution/3300-3399/3312.Sorted GCD Pair Queries/README.md b/solution/3300-3399/3312.Sorted GCD Pair Queries/README.md index 9c5afe8ece063..7220f5c2c4e71 100644 --- a/solution/3300-3399/3312.Sorted GCD Pair Queries/README.md +++ b/solution/3300-3399/3312.Sorted GCD Pair Queries/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3312.Sorted%20GCD%20Pair%20Queries/README.md +rating: 2532 +source: 第 418 场周赛 Q4 tags: - 数组 - 哈希表 diff --git a/solution/3300-3399/3312.Sorted GCD Pair Queries/README_EN.md b/solution/3300-3399/3312.Sorted GCD Pair Queries/README_EN.md index 2f780e208ad83..7fe6cb1fac594 100644 --- a/solution/3300-3399/3312.Sorted GCD Pair Queries/README_EN.md +++ b/solution/3300-3399/3312.Sorted GCD Pair Queries/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3312.Sorted%20GCD%20Pair%20Queries/README_EN.md +rating: 2532 +source: Weekly Contest 418 Q4 tags: - Array - Hash Table diff --git a/solution/3300-3399/3314.Construct the Minimum Bitwise Array I/README.md b/solution/3300-3399/3314.Construct the Minimum Bitwise Array I/README.md index 6b5475e0b1d20..fea3aaaafc814 100644 --- a/solution/3300-3399/3314.Construct the Minimum Bitwise Array I/README.md +++ b/solution/3300-3399/3314.Construct the Minimum Bitwise Array I/README.md @@ -2,6 +2,9 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3314.Construct%20the%20Minimum%20Bitwise%20Array%20I/README.md +tags: + - 位运算 + - 数组 --- diff --git a/solution/3300-3399/3314.Construct the Minimum Bitwise Array I/README_EN.md b/solution/3300-3399/3314.Construct the Minimum Bitwise Array I/README_EN.md index aeb5b42af38ba..c133b365167c9 100644 --- a/solution/3300-3399/3314.Construct the Minimum Bitwise Array I/README_EN.md +++ b/solution/3300-3399/3314.Construct the Minimum Bitwise Array I/README_EN.md @@ -2,6 +2,9 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3314.Construct%20the%20Minimum%20Bitwise%20Array%20I/README_EN.md +tags: + - Bit Manipulation + - Array --- diff --git a/solution/3300-3399/3315.Construct the Minimum Bitwise Array II/README.md b/solution/3300-3399/3315.Construct the Minimum Bitwise Array II/README.md index c4cdffe40a742..1fffa7ba785e1 100644 --- a/solution/3300-3399/3315.Construct the Minimum Bitwise Array II/README.md +++ b/solution/3300-3399/3315.Construct the Minimum Bitwise Array II/README.md @@ -2,6 +2,9 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3315.Construct%20the%20Minimum%20Bitwise%20Array%20II/README.md +tags: + - 位运算 + - 数组 --- diff --git a/solution/3300-3399/3315.Construct the Minimum Bitwise Array II/README_EN.md b/solution/3300-3399/3315.Construct the Minimum Bitwise Array II/README_EN.md index f9ae16599b691..da4aa0cd7cce0 100644 --- a/solution/3300-3399/3315.Construct the Minimum Bitwise Array II/README_EN.md +++ b/solution/3300-3399/3315.Construct the Minimum Bitwise Array II/README_EN.md @@ -2,6 +2,9 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3315.Construct%20the%20Minimum%20Bitwise%20Array%20II/README_EN.md +tags: + - Bit Manipulation + - Array --- diff --git a/solution/3300-3399/3316.Find Maximum Removals From Source String/README.md b/solution/3300-3399/3316.Find Maximum Removals From Source String/README.md index 522a5c9ad1b83..5e02847924663 100644 --- a/solution/3300-3399/3316.Find Maximum Removals From Source String/README.md +++ b/solution/3300-3399/3316.Find Maximum Removals From Source String/README.md @@ -2,6 +2,12 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3316.Find%20Maximum%20Removals%20From%20Source%20String/README.md +tags: + - 数组 + - 哈希表 + - 双指针 + - 字符串 + - 动态规划 --- diff --git a/solution/3300-3399/3316.Find Maximum Removals From Source String/README_EN.md b/solution/3300-3399/3316.Find Maximum Removals From Source String/README_EN.md index 766fa13dabc9f..243eb8f5a759b 100644 --- a/solution/3300-3399/3316.Find Maximum Removals From Source String/README_EN.md +++ b/solution/3300-3399/3316.Find Maximum Removals From Source String/README_EN.md @@ -2,6 +2,12 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3316.Find%20Maximum%20Removals%20From%20Source%20String/README_EN.md +tags: + - Array + - Hash Table + - Two Pointers + - String + - Dynamic Programming --- diff --git a/solution/3300-3399/3317.Find the Number of Possible Ways for an Event/README.md b/solution/3300-3399/3317.Find the Number of Possible Ways for an Event/README.md index 389826005dcf0..4e4dbed8681eb 100644 --- a/solution/3300-3399/3317.Find the Number of Possible Ways for an Event/README.md +++ b/solution/3300-3399/3317.Find the Number of Possible Ways for an Event/README.md @@ -2,6 +2,10 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3317.Find%20the%20Number%20of%20Possible%20Ways%20for%20an%20Event/README.md +tags: + - 数学 + - 动态规划 + - 组合数学 --- diff --git a/solution/3300-3399/3317.Find the Number of Possible Ways for an Event/README_EN.md b/solution/3300-3399/3317.Find the Number of Possible Ways for an Event/README_EN.md index 1616c8a6e59bc..9b2ce3b1998ff 100644 --- a/solution/3300-3399/3317.Find the Number of Possible Ways for an Event/README_EN.md +++ b/solution/3300-3399/3317.Find the Number of Possible Ways for an Event/README_EN.md @@ -2,6 +2,10 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3317.Find%20the%20Number%20of%20Possible%20Ways%20for%20an%20Event/README_EN.md +tags: + - Math + - Dynamic Programming + - Combinatorics --- diff --git a/solution/3300-3399/3318.Find X-Sum of All K-Long Subarrays I/README.md b/solution/3300-3399/3318.Find X-Sum of All K-Long Subarrays I/README.md index 2ca2e860a26df..0bd6560e29e19 100644 --- a/solution/3300-3399/3318.Find X-Sum of All K-Long Subarrays I/README.md +++ b/solution/3300-3399/3318.Find X-Sum of All K-Long Subarrays I/README.md @@ -2,6 +2,11 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3318.Find%20X-Sum%20of%20All%20K-Long%20Subarrays%20I/README.md +tags: + - 数组 + - 哈希表 + - 滑动窗口 + - 堆(优先队列) --- diff --git a/solution/3300-3399/3318.Find X-Sum of All K-Long Subarrays I/README_EN.md b/solution/3300-3399/3318.Find X-Sum of All K-Long Subarrays I/README_EN.md index 62143c5d02775..e6363631c8679 100644 --- a/solution/3300-3399/3318.Find X-Sum of All K-Long Subarrays I/README_EN.md +++ b/solution/3300-3399/3318.Find X-Sum of All K-Long Subarrays I/README_EN.md @@ -2,6 +2,11 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3318.Find%20X-Sum%20of%20All%20K-Long%20Subarrays%20I/README_EN.md +tags: + - Array + - Hash Table + - Sliding Window + - Heap (Priority Queue) --- diff --git a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/README.md b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/README.md index 9334a995525d3..c576073612048 100644 --- a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/README.md +++ b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/README.md @@ -2,6 +2,11 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3319.K-th%20Largest%20Perfect%20Subtree%20Size%20in%20Binary%20Tree/README.md +tags: + - 树 + - 深度优先搜索 + - 二叉树 + - 排序 --- @@ -33,9 +38,9 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3319.K-
解释:
-完美二叉子树的根节点在图中以黑色突出显示。它们的大小按降序排列为 [3, 3, 1, 1, 1, 1, 1, 1]
。
+
完美二叉子树的根节点在图中以黑色突出显示。它们的大小按非递增顺序排列为 [3, 3, 1, 1, 1, 1, 1, 1]
。
第 2
大的完美二叉子树的大小是 3。
解释:
-完美二叉子树的大小按降序排列为 [7, 3, 3, 1, 1, 1, 1]
。最大的完美二叉子树的大小是 7。
完美二叉子树的大小按非递增顺序排列为 [7, 3, 3, 1, 1, 1, 1]
。最大的完美二叉子树的大小是 7。
示例 3:
@@ -62,9 +67,9 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3319.K-解释:
-完美二叉子树的大小按降序排列为 [1, 1]
。完美二叉子树的数量少于 3。
完美二叉子树的大小按非递增顺序排列为 [1, 1]
。完美二叉子树的数量少于 3。
diff --git a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/README_EN.md b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/README_EN.md index b30257addfb7d..1c4353ef2d369 100644 --- a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/README_EN.md +++ b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/README_EN.md @@ -2,6 +2,11 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3319.K-th%20Largest%20Perfect%20Subtree%20Size%20in%20Binary%20Tree/README_EN.md +tags: + - Tree + - Depth-First Search + - Binary Tree + - Sorting --- @@ -30,9 +35,9 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3319.K-
Explanation:
-The roots of the perfect binary subtrees are highlighted in black. Their sizes, in decreasing order are [3, 3, 1, 1, 1, 1, 1, 1]
.
+
The roots of the perfect binary subtrees are highlighted in black. Their sizes, in non-increasing order are [3, 3, 1, 1, 1, 1, 1, 1]
.
The 2nd
largest size is 3.
2nd
largest size is 3.
Explanation:
-The sizes of the perfect binary subtrees in decreasing order are [7, 3, 3, 1, 1, 1, 1]
. The size of the largest perfect binary subtree is 7.
The sizes of the perfect binary subtrees in non-increasing order are [7, 3, 3, 1, 1, 1, 1]
. The size of the largest perfect binary subtree is 7.
Example 3:
@@ -59,9 +64,9 @@ The2nd
largest size is 3.
Explanation:
-The sizes of the perfect binary subtrees in decreasing order are [1, 1]
. There are fewer than 3 perfect binary subtrees.
The sizes of the perfect binary subtrees in non-increasing order are [1, 1]
. There are fewer than 3 perfect binary subtrees.
diff --git a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image.jpg b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image.jpg deleted file mode 100644 index 3a74b5a5d2644..0000000000000 Binary files a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image.jpg and /dev/null differ diff --git a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image1.jpg b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image1.jpg deleted file mode 100644 index 1d7ef9cf0523a..0000000000000 Binary files a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image1.jpg and /dev/null differ diff --git a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image4.jpg b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image4.jpg deleted file mode 100644 index f8c9987f20879..0000000000000 Binary files a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/image4.jpg and /dev/null differ diff --git a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmp74xnmpj4-1.png b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmp74xnmpj4-1.png new file mode 100644 index 0000000000000..1bab1d327d446 Binary files /dev/null and b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmp74xnmpj4-1.png differ diff --git a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmp_s508x9e-1.png b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmp_s508x9e-1.png new file mode 100644 index 0000000000000..739f4139975e9 Binary files /dev/null and b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmp_s508x9e-1.png differ diff --git a/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmpresl95rp-1.png b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmpresl95rp-1.png new file mode 100644 index 0000000000000..11e619452d358 Binary files /dev/null and b/solution/3300-3399/3319.K-th Largest Perfect Subtree Size in Binary Tree/images/tmpresl95rp-1.png differ diff --git a/solution/3300-3399/3320.Count The Number of Winning Sequences/README.md b/solution/3300-3399/3320.Count The Number of Winning Sequences/README.md index 93c61e0a55700..5fb78f3564b47 100644 --- a/solution/3300-3399/3320.Count The Number of Winning Sequences/README.md +++ b/solution/3300-3399/3320.Count The Number of Winning Sequences/README.md @@ -2,6 +2,9 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3320.Count%20The%20Number%20of%20Winning%20Sequences/README.md +tags: + - 字符串 + - 动态规划 --- diff --git a/solution/3300-3399/3320.Count The Number of Winning Sequences/README_EN.md b/solution/3300-3399/3320.Count The Number of Winning Sequences/README_EN.md index a8aeb66e0cebb..1972b87a463ca 100644 --- a/solution/3300-3399/3320.Count The Number of Winning Sequences/README_EN.md +++ b/solution/3300-3399/3320.Count The Number of Winning Sequences/README_EN.md @@ -2,6 +2,9 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3320.Count%20The%20Number%20of%20Winning%20Sequences/README_EN.md +tags: + - String + - Dynamic Programming --- @@ -67,7 +70,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3320.Co
1 <= s.length <= 1000
s[i]
is either 'F'
, 'W'
, or 'E'
.s[i]
is one of 'F'
, 'W'
, or 'E'
.Output:
-+------------+---------+-------------------+--------+-----------------+------+ -| season_id | team_id | team_name | points | goal_difference | rank | -+------------+---------+-------------------+--------+-----------------+------+ -| 2021 | 1 | Manchester City | 93 | 73 | 1 | -| 2021 | 2 | Liverpool | 92 | 68 | 2 | -| 2021 | 3 | Chelsea | 74 | 43 | 3 | -| 2021 | 4 | Tottenham | 71 | 29 | 4 | -| 2021 | 5 | Arsenal | 69 | 13 | 5 | -| 2022 | 1 | Manchester City | 89 | 61 | 1 | -| 2022 | 2 | Arsenal | 84 | 45 | 2 | -| 2022 | 3 | Manchester United | 75 | 15 | 3 | -| 2022 | 4 | Newcastle | 71 | 35 | 4 | -| 2022 | 5 | Liverpool | 67 | 28 | 5 | -+------------+---------+-------------------+--------+-----------------+------+ ++------------+---------+-------------------+--------+-----------------+----------+ +| season_id | team_id | team_name | points | goal_difference | position | ++------------+---------+-------------------+--------+-----------------+----------+ +| 2021 | 1 | Manchester City | 93 | 73 | 1 | +| 2021 | 2 | Liverpool | 92 | 68 | 2 | +| 2021 | 3 | Chelsea | 74 | 43 | 3 | +| 2021 | 4 | Tottenham | 71 | 29 | 4 | +| 2021 | 5 | Arsenal | 69 | 13 | 5 | +| 2022 | 1 | Manchester City | 89 | 61 | 1 | +| 2022 | 2 | Arsenal | 84 | 45 | 2 | +| 2022 | 3 | Manchester United | 75 | 15 | 3 | +| 2022 | 4 | Newcastle | 71 | 35 | 4 | +| 2022 | 5 | Liverpool | 67 | 28 | 5 | ++------------+---------+-------------------+--------+-----------------+----------+
Explanation:
diff --git a/solution/3300-3399/3323.Minimize Connected Groups by Inserting Interval/README.md b/solution/3300-3399/3323.Minimize Connected Groups by Inserting Interval/README.md new file mode 100644 index 0000000000000..040d357a4aded --- /dev/null +++ b/solution/3300-3399/3323.Minimize Connected Groups by Inserting Interval/README.md @@ -0,0 +1,243 @@ +--- +comments: true +difficulty: 中等 +edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3323.Minimize%20Connected%20Groups%20by%20Inserting%20Interval/README.md +--- + + + +# [3323. 通过插入区间最小化连通组 🔒](https://leetcode.cn/problems/minimize-connected-groups-by-inserting-interval) + +[English Version](/solution/3300-3399/3323.Minimize%20Connected%20Groups%20by%20Inserting%20Interval/README_EN.md) + +## 题目描述 + + + +给定一个 2 维数组 intervals
,其中 intervals[i] = [starti, endi]
表示区间 i
的开头和结尾。另外还给定一个整数 k
。
你必须向数组添加 恰好一个 新的区间 [startnew, endnew]
使得:
endnew - startnew
最多为 k
。intervals
中 连通组 的数量 最少。区间的 连通组 是一起覆盖了从最小点到最大点的连续范围,中间没有间隙的区间的最大集合。下面是一些例子:
+ +[[1, 2], [2, 5], [3, 3]]
是连通的,因为它们一起覆盖了 1 到 5 的范围,中间没有任何间隔。[[1, 2], [3, 4]]
不是连通的,因为 (2, 3)
段没有被覆盖。返回在添加 恰好一个 新区间到数组后连通组的 最小 数量。
+ ++ +
示例 1:
+ +输入:intervals = [[1,3],[5,6],[8,10]], k = 3
+ +输出:2
+ +解释:
+ +在添加区间 [3, 5]
后,我们有两个连通组:[[1, 3], [3, 5], [5, 6]]
和 [[8, 10]]
。
示例 2:
+ +输入:intervals = [[5,10],[1,1],[3,3]], k = 1
+ +输出:3
+ +解释:
+ +在添加区间 [1, 1]
后,我们有三个连通组:[[1, 1], [1, 1]]
,[[3, 3]]
,和 [[5, 10]]
。
+ +
提示:
+ +1 <= intervals.length <= 105
intervals[i] == [starti, endi]
1 <= starti <= endi <= 109
1 <= k <= 109
You are given a 2D array intervals
, where intervals[i] = [starti, endi]
represents the start and the end of interval i
. You are also given an integer k
.
You must add exactly one new interval [startnew, endnew]
to the array such that:
endnew - startnew
, is at most k
.intervals
is minimized.A connected group of intervals is a maximal collection of intervals that, when considered together, cover a continuous range from the smallest point to the largest point with no gaps between them. Here are some examples:
+ +[[1, 2], [2, 5], [3, 3]]
is connected because together they cover the range from 1 to 5 without any gaps.[[1, 2], [3, 4]]
is not connected because the segment (2, 3)
is not covered.Return the minimum number of connected groups after adding exactly one new interval to the array.
+ ++
Example 1:
+ +Input: intervals = [[1,3],[5,6],[8,10]], k = 3
+ +Output: 2
+ +Explanation:
+ +After adding the interval [3, 5]
, we have two connected groups: [[1, 3], [3, 5], [5, 6]]
and [[8, 10]]
.
Example 2:
+ +Input: intervals = [[5,10],[1,1],[3,3]], k = 1
+ +Output: 3
+ +Explanation:
+ +After adding the interval [1, 1]
, we have three connected groups: [[1, 1], [1, 1]]
, [[3, 3]]
, and [[5, 10]]
.
+
Constraints:
+ +1 <= intervals.length <= 105
intervals[i] == [starti, endi]
1 <= starti <= endi <= 109
1 <= k <= 109