diff --git a/solution/0700-0799/0729.My Calendar I/README_EN.md b/solution/0700-0799/0729.My Calendar I/README_EN.md index 124a9044aa47b..4a064579219ac 100644 --- a/solution/0700-0799/0729.My Calendar I/README_EN.md +++ b/solution/0700-0799/0729.My Calendar I/README_EN.md @@ -24,13 +24,13 @@ tags:

A double booking happens when two events have some non-empty intersection (i.e., some moment is common to both events.).

-

The event can be represented as a pair of integers start and end that represents a booking on the half-open interval [start, end), the range of real numbers x such that start <= x < end.

+

The event can be represented as a pair of integers startTime and endTime that represents a booking on the half-open interval [startTime, endTime), the range of real numbers x such that startTime <= x < endTime.

Implement the MyCalendar class:

 

diff --git a/solution/0700-0799/0731.My Calendar II/README_EN.md b/solution/0700-0799/0731.My Calendar II/README_EN.md index 8d00f49017e84..178bc2f4af6cf 100644 --- a/solution/0700-0799/0731.My Calendar II/README_EN.md +++ b/solution/0700-0799/0731.My Calendar II/README_EN.md @@ -25,13 +25,13 @@ tags:

A triple booking happens when three events have some non-empty intersection (i.e., some moment is common to all the three events.).

-

The event can be represented as a pair of integers start and end that represents a booking on the half-open interval [start, end), the range of real numbers x such that start <= x < end.

+

The event can be represented as a pair of integers startTime and endTime that represents a booking on the half-open interval [startTime, endTime), the range of real numbers x such that startTime <= x < endTime.

Implement the MyCalendarTwo class:

 

diff --git a/solution/3300-3399/3330.Find the Original Typed String I/README.md b/solution/3300-3399/3330.Find the Original Typed String I/README.md index 2006ae42d8c5f..b68a474e12cdd 100644 --- a/solution/3300-3399/3330.Find the Original Typed String I/README.md +++ b/solution/3300-3399/3330.Find the Original Typed String I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3330.Find%20the%20Original%20Typed%20String%20I/README.md +tags: + - 字符串 --- diff --git a/solution/3300-3399/3330.Find the Original Typed String I/README_EN.md b/solution/3300-3399/3330.Find the Original Typed String I/README_EN.md index 323f91ba47729..702b8b2a16d58 100644 --- a/solution/3300-3399/3330.Find the Original Typed String I/README_EN.md +++ b/solution/3300-3399/3330.Find the Original Typed String I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3330.Find%20the%20Original%20Typed%20String%20I/README_EN.md +tags: + - String --- diff --git a/solution/3300-3399/3331.Find Subtree Sizes After Changes/README.md b/solution/3300-3399/3331.Find Subtree Sizes After Changes/README.md index affed3364d58e..ba2961e190397 100644 --- a/solution/3300-3399/3331.Find Subtree Sizes After Changes/README.md +++ b/solution/3300-3399/3331.Find Subtree Sizes After Changes/README.md @@ -2,6 +2,12 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3331.Find%20Subtree%20Sizes%20After%20Changes/README.md +tags: + - 树 + - 深度优先搜索 + - 数组 + - 哈希表 + - 字符串 --- diff --git a/solution/3300-3399/3331.Find Subtree Sizes After Changes/README_EN.md b/solution/3300-3399/3331.Find Subtree Sizes After Changes/README_EN.md index ea8a3842153f4..a974bae5c974b 100644 --- a/solution/3300-3399/3331.Find Subtree Sizes After Changes/README_EN.md +++ b/solution/3300-3399/3331.Find Subtree Sizes After Changes/README_EN.md @@ -2,6 +2,12 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3331.Find%20Subtree%20Sizes%20After%20Changes/README_EN.md +tags: + - Tree + - Depth-First Search + - Array + - Hash Table + - String --- @@ -26,9 +32,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3331.Fi
  • Otherwise, remove the edge between x and its current parent and make node y the new parent of x by adding an edge between them.
  • -

    Return an array answer of size n where answer[i] is the size of the subtree rooted at node i in the final tree.

    - -

    A subtree of treeName is a tree consisting of a node in treeName and all of its descendants.

    +

    Return an array answer of size n where answer[i] is the size of the subtree rooted at node i in the final tree.

     

    Example 1:

    diff --git a/solution/3300-3399/3332.Maximum Points Tourist Can Earn/README.md b/solution/3300-3399/3332.Maximum Points Tourist Can Earn/README.md index 9c26ec0bbcdc8..503251b7614b0 100644 --- a/solution/3300-3399/3332.Maximum Points Tourist Can Earn/README.md +++ b/solution/3300-3399/3332.Maximum Points Tourist Can Earn/README.md @@ -2,6 +2,10 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3332.Maximum%20Points%20Tourist%20Can%20Earn/README.md +tags: + - 数组 + - 动态规划 + - 矩阵 --- diff --git a/solution/3300-3399/3332.Maximum Points Tourist Can Earn/README_EN.md b/solution/3300-3399/3332.Maximum Points Tourist Can Earn/README_EN.md index a81f33c55ef96..8f186f0129bc7 100644 --- a/solution/3300-3399/3332.Maximum Points Tourist Can Earn/README_EN.md +++ b/solution/3300-3399/3332.Maximum Points Tourist Can Earn/README_EN.md @@ -2,6 +2,10 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3332.Maximum%20Points%20Tourist%20Can%20Earn/README_EN.md +tags: + - Array + - Dynamic Programming + - Matrix --- diff --git a/solution/3300-3399/3333.Find the Original Typed String II/README.md b/solution/3300-3399/3333.Find the Original Typed String II/README.md index 7b7f97db07ba6..027c1f56019f7 100644 --- a/solution/3300-3399/3333.Find the Original Typed String II/README.md +++ b/solution/3300-3399/3333.Find the Original Typed String II/README.md @@ -2,6 +2,10 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3333.Find%20the%20Original%20Typed%20String%20II/README.md +tags: + - 字符串 + - 动态规划 + - 前缀和 --- diff --git a/solution/3300-3399/3333.Find the Original Typed String II/README_EN.md b/solution/3300-3399/3333.Find the Original Typed String II/README_EN.md index 243cc7046d80b..7a42fcd213ad8 100644 --- a/solution/3300-3399/3333.Find the Original Typed String II/README_EN.md +++ b/solution/3300-3399/3333.Find the Original Typed String II/README_EN.md @@ -2,6 +2,10 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3333.Find%20the%20Original%20Typed%20String%20II/README_EN.md +tags: + - String + - Dynamic Programming + - Prefix Sum --- diff --git a/solution/3300-3399/3334.Find the Maximum Factor Score of Array/README.md b/solution/3300-3399/3334.Find the Maximum Factor Score of Array/README.md index b88c0719354be..6e999fc47feb7 100644 --- a/solution/3300-3399/3334.Find the Maximum Factor Score of Array/README.md +++ b/solution/3300-3399/3334.Find the Maximum Factor Score of Array/README.md @@ -2,6 +2,10 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3334.Find%20the%20Maximum%20Factor%20Score%20of%20Array/README.md +tags: + - 数组 + - 数学 + - 数论 --- diff --git a/solution/3300-3399/3334.Find the Maximum Factor Score of Array/README_EN.md b/solution/3300-3399/3334.Find the Maximum Factor Score of Array/README_EN.md index 86019f7f7ca19..f2b6bb85978ee 100644 --- a/solution/3300-3399/3334.Find the Maximum Factor Score of Array/README_EN.md +++ b/solution/3300-3399/3334.Find the Maximum Factor Score of Array/README_EN.md @@ -2,6 +2,10 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3334.Find%20the%20Maximum%20Factor%20Score%20of%20Array/README_EN.md +tags: + - Array + - Math + - Number Theory --- @@ -20,11 +24,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3334.Fi

    Return the maximum factor score of nums after removing at most one element from it.

    -

    Note that both the LCM and GCD of a single number are the number itself, and the factor score of an empty array is 0.

    - -

    The term lcm(a, b) denotes the least common multiple of a and b.

    - -

    The term gcd(a, b) denotes the greatest common divisor of a and b.

    +

    Note that both the LCM and GCD of a single number are the number itself, and the factor score of an empty array is 0.

     

    Example 1:

    diff --git a/solution/3300-3399/3335.Total Characters in String After Transformations I/README.md b/solution/3300-3399/3335.Total Characters in String After Transformations I/README.md index 12fbd2a0323dc..803e83832527b 100644 --- a/solution/3300-3399/3335.Total Characters in String After Transformations I/README.md +++ b/solution/3300-3399/3335.Total Characters in String After Transformations I/README.md @@ -2,6 +2,12 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3335.Total%20Characters%20in%20String%20After%20Transformations%20I/README.md +tags: + - 哈希表 + - 数学 + - 字符串 + - 动态规划 + - 计数 --- diff --git a/solution/3300-3399/3335.Total Characters in String After Transformations I/README_EN.md b/solution/3300-3399/3335.Total Characters in String After Transformations I/README_EN.md index 68d6172237858..b5f2ed836ddcb 100644 --- a/solution/3300-3399/3335.Total Characters in String After Transformations I/README_EN.md +++ b/solution/3300-3399/3335.Total Characters in String After Transformations I/README_EN.md @@ -2,6 +2,12 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3335.Total%20Characters%20in%20String%20After%20Transformations%20I/README_EN.md +tags: + - Hash Table + - Math + - String + - Dynamic Programming + - Counting --- diff --git a/solution/3300-3399/3336.Find the Number of Subsequences With Equal GCD/README.md b/solution/3300-3399/3336.Find the Number of Subsequences With Equal GCD/README.md index 3d515ef950232..6ac7d360ba4cf 100644 --- a/solution/3300-3399/3336.Find the Number of Subsequences With Equal GCD/README.md +++ b/solution/3300-3399/3336.Find the Number of Subsequences With Equal GCD/README.md @@ -2,6 +2,11 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3336.Find%20the%20Number%20of%20Subsequences%20With%20Equal%20GCD/README.md +tags: + - 数组 + - 数学 + - 动态规划 + - 数论 --- diff --git a/solution/3300-3399/3336.Find the Number of Subsequences With Equal GCD/README_EN.md b/solution/3300-3399/3336.Find the Number of Subsequences With Equal GCD/README_EN.md index 8c7424256013e..54937439fe939 100644 --- a/solution/3300-3399/3336.Find the Number of Subsequences With Equal GCD/README_EN.md +++ b/solution/3300-3399/3336.Find the Number of Subsequences With Equal GCD/README_EN.md @@ -2,6 +2,11 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3336.Find%20the%20Number%20of%20Subsequences%20With%20Equal%20GCD/README_EN.md +tags: + - Array + - Math + - Dynamic Programming + - Number Theory --- @@ -16,21 +21,17 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3336.Fi

    You are given an integer array nums.

    -

    Your task is to find the number of pairs of non-empty subsequences (seq1, seq2) of nums that satisfy the following conditions:

    +

    Your task is to find the number of pairs of non-empty subsequences (seq1, seq2) of nums that satisfy the following conditions:

    Return the total number of such pairs.

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

    -

    The term gcd(a, b) denotes the greatest common divisor of a and b.

    - -

    A subsequence is an array that can be derived from another array by deleting some or no elements without changing the order of the remaining elements.

    -

     

    Example 1:

    diff --git a/solution/3300-3399/3337.Total Characters in String After Transformations II/README.md b/solution/3300-3399/3337.Total Characters in String After Transformations II/README.md index e197e2602ec5c..26f128d93e293 100644 --- a/solution/3300-3399/3337.Total Characters in String After Transformations II/README.md +++ b/solution/3300-3399/3337.Total Characters in String After Transformations II/README.md @@ -2,6 +2,12 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3337.Total%20Characters%20in%20String%20After%20Transformations%20II/README.md +tags: + - 哈希表 + - 数学 + - 字符串 + - 动态规划 + - 计数 --- diff --git a/solution/3300-3399/3337.Total Characters in String After Transformations II/README_EN.md b/solution/3300-3399/3337.Total Characters in String After Transformations II/README_EN.md index 948726aea20b6..1e3ba5e6aea8e 100644 --- a/solution/3300-3399/3337.Total Characters in String After Transformations II/README_EN.md +++ b/solution/3300-3399/3337.Total Characters in String After Transformations II/README_EN.md @@ -2,6 +2,12 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3300-3399/3337.Total%20Characters%20in%20String%20After%20Transformations%20II/README_EN.md +tags: + - Hash Table + - Math + - String + - Dynamic Programming + - Counting --- diff --git a/solution/README.md b/solution/README.md index 14ed984e7010a..96c449c9b9a03 100644 --- a/solution/README.md +++ b/solution/README.md @@ -3340,14 +3340,14 @@ | 3327 | [判断 DFS 字符串是否是回文串](/solution/3300-3399/3327.Check%20if%20DFS%20Strings%20Are%20Palindromes/README.md) | `树`,`深度优先搜索`,`数组`,`哈希表`,`字符串`,`哈希函数` | 困难 | 第 420 场周赛 | | 3328 | [查找每个州的城市 II](/solution/3300-3399/3328.Find%20Cities%20in%20Each%20State%20II/README.md) | `数据库` | 中等 | 🔒 | | 3329 | [字符至少出现 K 次的子字符串 II](/solution/3300-3399/3329.Count%20Substrings%20With%20K-Frequency%20Characters%20II/README.md) | `哈希表`,`字符串`,`滑动窗口` | 困难 | 🔒 | -| 3330 | [找到初始输入字符串 I](/solution/3300-3399/3330.Find%20the%20Original%20Typed%20String%20I/README.md) | | 简单 | 第 142 场双周赛 | -| 3331 | [修改后子树的大小](/solution/3300-3399/3331.Find%20Subtree%20Sizes%20After%20Changes/README.md) | | 中等 | 第 142 场双周赛 | -| 3332 | [旅客可以得到的最多点数](/solution/3300-3399/3332.Maximum%20Points%20Tourist%20Can%20Earn/README.md) | | 中等 | 第 142 场双周赛 | -| 3333 | [找到初始输入字符串 II](/solution/3300-3399/3333.Find%20the%20Original%20Typed%20String%20II/README.md) | | 困难 | 第 142 场双周赛 | -| 3334 | [数组的最大因子得分](/solution/3300-3399/3334.Find%20the%20Maximum%20Factor%20Score%20of%20Array/README.md) | | 中等 | 第 421 场周赛 | -| 3335 | [字符串转换后的长度 I](/solution/3300-3399/3335.Total%20Characters%20in%20String%20After%20Transformations%20I/README.md) | | 中等 | 第 421 场周赛 | -| 3336 | [最大公约数相等的子序列数量](/solution/3300-3399/3336.Find%20the%20Number%20of%20Subsequences%20With%20Equal%20GCD/README.md) | | 困难 | 第 421 场周赛 | -| 3337 | [字符串转换后的长度 II](/solution/3300-3399/3337.Total%20Characters%20in%20String%20After%20Transformations%20II/README.md) | | 困难 | 第 421 场周赛 | +| 3330 | [找到初始输入字符串 I](/solution/3300-3399/3330.Find%20the%20Original%20Typed%20String%20I/README.md) | `字符串` | 简单 | 第 142 场双周赛 | +| 3331 | [修改后子树的大小](/solution/3300-3399/3331.Find%20Subtree%20Sizes%20After%20Changes/README.md) | `树`,`深度优先搜索`,`数组`,`哈希表`,`字符串` | 中等 | 第 142 场双周赛 | +| 3332 | [旅客可以得到的最多点数](/solution/3300-3399/3332.Maximum%20Points%20Tourist%20Can%20Earn/README.md) | `数组`,`动态规划`,`矩阵` | 中等 | 第 142 场双周赛 | +| 3333 | [找到初始输入字符串 II](/solution/3300-3399/3333.Find%20the%20Original%20Typed%20String%20II/README.md) | `字符串`,`动态规划`,`前缀和` | 困难 | 第 142 场双周赛 | +| 3334 | [数组的最大因子得分](/solution/3300-3399/3334.Find%20the%20Maximum%20Factor%20Score%20of%20Array/README.md) | `数组`,`数学`,`数论` | 中等 | 第 421 场周赛 | +| 3335 | [字符串转换后的长度 I](/solution/3300-3399/3335.Total%20Characters%20in%20String%20After%20Transformations%20I/README.md) | `哈希表`,`数学`,`字符串`,`动态规划`,`计数` | 中等 | 第 421 场周赛 | +| 3336 | [最大公约数相等的子序列数量](/solution/3300-3399/3336.Find%20the%20Number%20of%20Subsequences%20With%20Equal%20GCD/README.md) | `数组`,`数学`,`动态规划`,`数论` | 困难 | 第 421 场周赛 | +| 3337 | [字符串转换后的长度 II](/solution/3300-3399/3337.Total%20Characters%20in%20String%20After%20Transformations%20II/README.md) | `哈希表`,`数学`,`字符串`,`动态规划`,`计数` | 困难 | 第 421 场周赛 | | 3338 | [Second Highest Salary II](/solution/3300-3399/3338.Second%20Highest%20Salary%20II/README.md) | `数据库` | 中等 | 🔒 | ## 版权 diff --git a/solution/README_EN.md b/solution/README_EN.md index d036caecd6df9..88d6eed6b164e 100644 --- a/solution/README_EN.md +++ b/solution/README_EN.md @@ -3338,14 +3338,14 @@ Press Control + F(or Command + F on | 3327 | [Check if DFS Strings Are Palindromes](/solution/3300-3399/3327.Check%20if%20DFS%20Strings%20Are%20Palindromes/README_EN.md) | `Tree`,`Depth-First Search`,`Array`,`Hash Table`,`String`,`Hash Function` | Hard | Weekly Contest 420 | | 3328 | [Find Cities in Each State II](/solution/3300-3399/3328.Find%20Cities%20in%20Each%20State%20II/README_EN.md) | `Database` | Medium | 🔒 | | 3329 | [Count Substrings With K-Frequency Characters II](/solution/3300-3399/3329.Count%20Substrings%20With%20K-Frequency%20Characters%20II/README_EN.md) | `Hash Table`,`String`,`Sliding Window` | Hard | 🔒 | -| 3330 | [Find the Original Typed String I](/solution/3300-3399/3330.Find%20the%20Original%20Typed%20String%20I/README_EN.md) | | Easy | Biweekly Contest 142 | -| 3331 | [Find Subtree Sizes After Changes](/solution/3300-3399/3331.Find%20Subtree%20Sizes%20After%20Changes/README_EN.md) | | Medium | Biweekly Contest 142 | -| 3332 | [Maximum Points Tourist Can Earn](/solution/3300-3399/3332.Maximum%20Points%20Tourist%20Can%20Earn/README_EN.md) | | Medium | Biweekly Contest 142 | -| 3333 | [Find the Original Typed String II](/solution/3300-3399/3333.Find%20the%20Original%20Typed%20String%20II/README_EN.md) | | Hard | Biweekly Contest 142 | -| 3334 | [Find the Maximum Factor Score of Array](/solution/3300-3399/3334.Find%20the%20Maximum%20Factor%20Score%20of%20Array/README_EN.md) | | Medium | Weekly Contest 421 | -| 3335 | [Total Characters in String After Transformations I](/solution/3300-3399/3335.Total%20Characters%20in%20String%20After%20Transformations%20I/README_EN.md) | | Medium | Weekly Contest 421 | -| 3336 | [Find the Number of Subsequences With Equal GCD](/solution/3300-3399/3336.Find%20the%20Number%20of%20Subsequences%20With%20Equal%20GCD/README_EN.md) | | Hard | Weekly Contest 421 | -| 3337 | [Total Characters in String After Transformations II](/solution/3300-3399/3337.Total%20Characters%20in%20String%20After%20Transformations%20II/README_EN.md) | | Hard | Weekly Contest 421 | +| 3330 | [Find the Original Typed String I](/solution/3300-3399/3330.Find%20the%20Original%20Typed%20String%20I/README_EN.md) | `String` | Easy | Biweekly Contest 142 | +| 3331 | [Find Subtree Sizes After Changes](/solution/3300-3399/3331.Find%20Subtree%20Sizes%20After%20Changes/README_EN.md) | `Tree`,`Depth-First Search`,`Array`,`Hash Table`,`String` | Medium | Biweekly Contest 142 | +| 3332 | [Maximum Points Tourist Can Earn](/solution/3300-3399/3332.Maximum%20Points%20Tourist%20Can%20Earn/README_EN.md) | `Array`,`Dynamic Programming`,`Matrix` | Medium | Biweekly Contest 142 | +| 3333 | [Find the Original Typed String II](/solution/3300-3399/3333.Find%20the%20Original%20Typed%20String%20II/README_EN.md) | `String`,`Dynamic Programming`,`Prefix Sum` | Hard | Biweekly Contest 142 | +| 3334 | [Find the Maximum Factor Score of Array](/solution/3300-3399/3334.Find%20the%20Maximum%20Factor%20Score%20of%20Array/README_EN.md) | `Array`,`Math`,`Number Theory` | Medium | Weekly Contest 421 | +| 3335 | [Total Characters in String After Transformations I](/solution/3300-3399/3335.Total%20Characters%20in%20String%20After%20Transformations%20I/README_EN.md) | `Hash Table`,`Math`,`String`,`Dynamic Programming`,`Counting` | Medium | Weekly Contest 421 | +| 3336 | [Find the Number of Subsequences With Equal GCD](/solution/3300-3399/3336.Find%20the%20Number%20of%20Subsequences%20With%20Equal%20GCD/README_EN.md) | `Array`,`Math`,`Dynamic Programming`,`Number Theory` | Hard | Weekly Contest 421 | +| 3337 | [Total Characters in String After Transformations II](/solution/3300-3399/3337.Total%20Characters%20in%20String%20After%20Transformations%20II/README_EN.md) | `Hash Table`,`Math`,`String`,`Dynamic Programming`,`Counting` | Hard | Weekly Contest 421 | | 3338 | [Second Highest Salary II](/solution/3300-3399/3338.Second%20Highest%20Salary%20II/README_EN.md) | `Database` | Medium | 🔒 | ## Copyright