From c855ea18ffec0c0d79502bb362a0a5f198831e15 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Wed, 19 Mar 2025 08:41:44 +0800 Subject: [PATCH] feat: update lc problems --- .../README.md | 35 +++++++- .../README_EN.md | 37 +++++++-- .../Solution.rs | 22 +++++ .../Solution.ts | 2 +- .../README.md | 2 +- .../README_EN.md | 2 +- .../README.md | 2 +- .../README_EN.md | 2 +- .../3481.Apply Substitutions/README.md | 54 ++++++------ .../README.md | 83 ++++++++++--------- .../3491.Phone Number Prefix/README.md | 30 +++---- solution/DATABASE_README.md | 2 +- solution/README.md | 6 +- 13 files changed, 180 insertions(+), 99 deletions(-) create mode 100644 solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/Solution.rs diff --git a/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/README.md b/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/README.md index 4dfe8f322ecd7..4dee1a3f9a378 100644 --- a/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/README.md +++ b/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/README.md @@ -68,13 +68,13 @@ nums 中的所有元素都有用到,并且每一行都由不同的整数组成 ### 方法一:数组或哈希表 -我们先用数组或哈希表 $cnt$ 统计数组 $nums$ 中每个元素出现的次数。 +我们先用一个数组或者哈希表 $\textit{cnt}$ 统计数组 $\textit{nums}$ 中每个元素出现的次数。 -然后遍历 $cnt$,对于每个元素 $x$,我们将其添加到答案列表中的第 $0$ 行,第 $1$ 行,第 $2$ 行,...,第 $cnt[x]-1$ 行。 +然后遍历 $\textit{cnt}$,对于每个元素 $x$,我们将其添加到答案列表中的第 $0$ 行,第 $1$ 行,第 $2$ 行,...,第 $\textit{cnt}[x]-1$ 行。 最后返回答案列表即可。 -时间复杂度 $O(n)$,空间复杂度 $O(n)$。其中 $n$ 为数组 $nums$ 的长度。 +时间复杂度 $O(n)$,空间复杂度 $O(n)$。其中 $n$ 为数组 $\textit{nums}$ 的长度。 @@ -171,7 +171,7 @@ func findMatrix(nums []int) (ans [][]int) { function findMatrix(nums: number[]): number[][] { const ans: number[][] = []; const n = nums.length; - const cnt: number[] = new Array(n + 1).fill(0); + const cnt: number[] = Array(n + 1).fill(0); for (const x of nums) { ++cnt[x]; } @@ -187,6 +187,33 @@ function findMatrix(nums: number[]): number[][] { } ``` +#### Rust + +```rust +impl Solution { + pub fn find_matrix(nums: Vec) -> Vec> { + let n = nums.len(); + let mut cnt = vec![0; n + 1]; + let mut ans: Vec> = Vec::new(); + + for &x in &nums { + cnt[x as usize] += 1; + } + + for x in 1..=n as i32 { + for j in 0..cnt[x as usize] { + if ans.len() <= j { + ans.push(Vec::new()); + } + ans[j].push(x); + } + } + + ans + } +} +``` + diff --git a/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/README_EN.md b/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/README_EN.md index e299ea99103fd..4616132667955 100644 --- a/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/README_EN.md +++ b/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/README_EN.md @@ -68,13 +68,13 @@ It can be shown that we cannot have less than 3 rows in a valid array. ### Solution 1: Array or Hash Table -We use an array or hash table $cnt$ to count the number of occurrences of each element in the array $nums$. +We first use an array or hash table $\textit{cnt}$ to count the frequency of each element in the array $\textit{nums}$. -Then we traverse the $cnt$ array, add $x$ to the $0$th row, the $1$st row, the $2$nd row, ..., the ($cnt[x]-1$)th row of the answer list. +Then we iterate through $\textit{cnt}$. For each element $x$, we add it to the 0th row, 1st row, 2nd row, ..., and $(cnt[x]-1)$th row of the answer list. -Finally, return the answer list. +Finally, we return the answer list. -The time complexity is $O(n)$ and the space complexity is $O(n)$, where $n$ is the length of the array $nums$. +The time complexity is $O(n)$, and the space complexity is $O(n)$. Where $n$ is the length of the array $\textit{nums}$. @@ -171,7 +171,7 @@ func findMatrix(nums []int) (ans [][]int) { function findMatrix(nums: number[]): number[][] { const ans: number[][] = []; const n = nums.length; - const cnt: number[] = new Array(n + 1).fill(0); + const cnt: number[] = Array(n + 1).fill(0); for (const x of nums) { ++cnt[x]; } @@ -187,6 +187,33 @@ function findMatrix(nums: number[]): number[][] { } ``` +#### Rust + +```rust +impl Solution { + pub fn find_matrix(nums: Vec) -> Vec> { + let n = nums.len(); + let mut cnt = vec![0; n + 1]; + let mut ans: Vec> = Vec::new(); + + for &x in &nums { + cnt[x as usize] += 1; + } + + for x in 1..=n as i32 { + for j in 0..cnt[x as usize] { + if ans.len() <= j { + ans.push(Vec::new()); + } + ans[j].push(x); + } + } + + ans + } +} +``` + diff --git a/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/Solution.rs b/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/Solution.rs new file mode 100644 index 0000000000000..1ce0d8b6039f8 --- /dev/null +++ b/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/Solution.rs @@ -0,0 +1,22 @@ +impl Solution { + pub fn find_matrix(nums: Vec) -> Vec> { + let n = nums.len(); + let mut cnt = vec![0; n + 1]; + let mut ans: Vec> = Vec::new(); + + for &x in &nums { + cnt[x as usize] += 1; + } + + for x in 1..=n as i32 { + for j in 0..cnt[x as usize] { + if ans.len() <= j { + ans.push(Vec::new()); + } + ans[j].push(x); + } + } + + ans + } +} diff --git a/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/Solution.ts b/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/Solution.ts index 7889ec4dee54a..dd20a154052e9 100644 --- a/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/Solution.ts +++ b/solution/2600-2699/2610.Convert an Array Into a 2D Array With Conditions/Solution.ts @@ -1,7 +1,7 @@ function findMatrix(nums: number[]): number[][] { const ans: number[][] = []; const n = nums.length; - const cnt: number[] = new Array(n + 1).fill(0); + const cnt: number[] = Array(n + 1).fill(0); for (const x of nums) { ++cnt[x]; } diff --git a/solution/2800-2899/2873.Maximum Value of an Ordered Triplet I/README.md b/solution/2800-2899/2873.Maximum Value of an Ordered Triplet I/README.md index 7388b8f90de61..7632cb7d1358c 100644 --- a/solution/2800-2899/2873.Maximum Value of an Ordered Triplet I/README.md +++ b/solution/2800-2899/2873.Maximum Value of an Ordered Triplet I/README.md @@ -41,7 +41,7 @@ tags: 输入:nums = [1,10,3,4,19] 输出:133 解释:下标三元组 (1, 2, 4) 的值是 (nums[1] - nums[2]) * nums[4] = 133 。 -可以证明不存在值大于 133 的有序下标三元组。 +可以证明不存在值大于 133 的有序下标三元组。

示例 3:

diff --git a/solution/2800-2899/2873.Maximum Value of an Ordered Triplet I/README_EN.md b/solution/2800-2899/2873.Maximum Value of an Ordered Triplet I/README_EN.md index 33c09398f9fc5..c9a88e029f58b 100644 --- a/solution/2800-2899/2873.Maximum Value of an Ordered Triplet I/README_EN.md +++ b/solution/2800-2899/2873.Maximum Value of an Ordered Triplet I/README_EN.md @@ -31,7 +31,7 @@ tags: Input: nums = [12,6,1,2,7] Output: 77 Explanation: The value of the triplet (0, 2, 4) is (nums[0] - nums[2]) * nums[4] = 77. -It can be shown that there are no ordered triplets of indices with a value greater than 77. +It can be shown that there are no ordered triplets of indices with a value greater than 77.

Example 2:

diff --git a/solution/2800-2899/2874.Maximum Value of an Ordered Triplet II/README.md b/solution/2800-2899/2874.Maximum Value of an Ordered Triplet II/README.md index 6f8732b67ac97..2071190e73080 100644 --- a/solution/2800-2899/2874.Maximum Value of an Ordered Triplet II/README.md +++ b/solution/2800-2899/2874.Maximum Value of an Ordered Triplet II/README.md @@ -41,7 +41,7 @@ tags: 输入:nums = [1,10,3,4,19] 输出:133 解释:下标三元组 (1, 2, 4) 的值是 (nums[1] - nums[2]) * nums[4] = 133 。 -可以证明不存在值大于 133 的有序下标三元组。 +可以证明不存在值大于 133 的有序下标三元组。

示例 3:

diff --git a/solution/2800-2899/2874.Maximum Value of an Ordered Triplet II/README_EN.md b/solution/2800-2899/2874.Maximum Value of an Ordered Triplet II/README_EN.md index 24b82d12a4169..b164dd835358b 100644 --- a/solution/2800-2899/2874.Maximum Value of an Ordered Triplet II/README_EN.md +++ b/solution/2800-2899/2874.Maximum Value of an Ordered Triplet II/README_EN.md @@ -31,7 +31,7 @@ tags: Input: nums = [12,6,1,2,7] Output: 77 Explanation: The value of the triplet (0, 2, 4) is (nums[0] - nums[2]) * nums[4] = 77. -It can be shown that there are no ordered triplets of indices with a value greater than 77. +It can be shown that there are no ordered triplets of indices with a value greater than 77.

Example 2:

diff --git a/solution/3400-3499/3481.Apply Substitutions/README.md b/solution/3400-3499/3481.Apply Substitutions/README.md index eebaf3ea31620..f385b64b2cf65 100644 --- a/solution/3400-3499/3481.Apply Substitutions/README.md +++ b/solution/3400-3499/3481.Apply Substitutions/README.md @@ -14,7 +14,7 @@ tags: -# [3481. Apply Substitutions 🔒](https://leetcode.cn/problems/apply-substitutions) +# [3481. 应用替换 🔒](https://leetcode.cn/problems/apply-substitutions) [English Version](/solution/3400-3499/3481.Apply%20Substitutions/README_EN.md) @@ -22,60 +22,62 @@ tags: -

You are given a replacements mapping and a text string that may contain placeholders formatted as %var%, where each var corresponds to a key in the replacements mapping. Each replacement value may itself contain one or more such placeholders. Each placeholder is replaced by the value associated with its corresponding replacement key.

+

给定一个 replacements 映射和一个可能包含格式为 %var% 占位符 的字符串 text,其中每个 var 对应 replacements 中的一个键。每个替换值本身可能包含 一个或多个 此类占位符。每个 占位符 都被与其相应的替换键对应的值替换。

-

Return the fully substituted text string which does not contain any placeholders.

+

返回完全替换后 含任何 占位符 的 text 字符串。

 

-

Example 1:

+ +

示例 1:

-

Input: replacements = [["A","abc"],["B","def"]], text = "%A%_%B%"

+

输入:replacements = [["A","abc"],["B","def"]], text = "%A%_%B%"

-

Output: "abc_def"

+

输出:"abc_def"

-

Explanation:

+

解释:

    -
  • The mapping associates "A" with "abc" and "B" with "def".
  • -
  • Replace %A% with "abc" and %B% with "def" in the text.
  • -
  • The final text becomes "abc_def".
  • +
  • 映射将 "A" 与 "abc" 关联,并将 "B" 与 "def" 关联。
  • +
  • 用 "abc" 替换文本中的 %A%,并用 "def" 替换文本中的 %B%
  • +
  • 最终文本变为 "abc_def"
-

Example 2:

+

示例 2:

-

Input: replacements = [["A","bce"],["B","ace"],["C","abc%B%"]], text = "%A%_%B%_%C%"

+

输入:replacements = [["A","bce"],["B","ace"],["C","abc%B%"]], text = "%A%_%B%_%C%"

-

Output: "bce_ace_abcace"

+

输出:"bce_ace_abcace"

-

Explanation:

+

解释:

    -
  • The mapping associates "A" with "bce", "B" with "ace", and "C" with "abc%B%".
  • -
  • Replace %A% with "bce" and %B% with "ace" in the text.
  • -
  • Then, for %C%, substitute %B% in "abc%B%" with "ace" to obtain "abcace".
  • -
  • The final text becomes "bce_ace_abcace".
  • +
  • 映射将 "A" 与 "bce" 关联,"B" 与 "ace" 关联,以及 "C" 与 "abc%B%" 关联。
  • +
  • 用 "bce" 替换文本中的 %A%,并用 "ace" 替换文本中的 %B%
  • +
  • 接着,对于 %C%,用 "ace" 替换 "abc%B%" 中的 %B% 来得到 "abcace"
  • +
  • 最终文本变为 "bce_ace_abcace"

 

-

Constraints:

+ +

提示:

  • 1 <= replacements.length <= 10
  • -
  • Each element of replacements is a two-element list [key, value], where: +
  • replacements 中的每个元素是一个双值列表 [key, value],其中:
      -
    • key is a single uppercase English letter.
    • -
    • value is a non-empty string of at most 8 characters that may contain zero or more placeholders formatted as %<key>%.
    • +
    • key 是一个大写英语字母。
    • +
    • value 是一个最多有 8 个字符,可能包含 0 个或更多格式为 %<key>% 的占位符的非空字符串。
  • -
  • All replacement keys are unique.
  • -
  • The text string is formed by concatenating all key placeholders (formatted as %<key>%) randomly from the replacements mapping, separated by underscores.
  • +
  • 所有的替换键互不相同。
  • +
  • text 字符串是通过从替换映射中随机串联所有 key 占位符(格式为 %<key>%)而形成的,以虚线分隔。
  • text.length == 4 * replacements.length - 1
  • -
  • Every placeholder in the text or in any replacement value corresponds to a key in the replacements mapping.
  • -
  • There are no cyclic dependencies between replacement keys.
  • +
  • text 或任何替换值中的每个占位符对应 replacements 映射中的一个键。
  • +
  • 替换键之间没有循环依赖。
diff --git a/solution/3400-3499/3482.Analyze Organization Hierarchy/README.md b/solution/3400-3499/3482.Analyze Organization Hierarchy/README.md index 097e76748ce55..88409e56b6bbd 100644 --- a/solution/3400-3499/3482.Analyze Organization Hierarchy/README.md +++ b/solution/3400-3499/3482.Analyze Organization Hierarchy/README.md @@ -8,7 +8,7 @@ tags: -# [3482. Analyze Organization Hierarchy](https://leetcode.cn/problems/analyze-organization-hierarchy) +# [3482. 分析组织层级](https://leetcode.cn/problems/analyze-organization-hierarchy) [English Version](/solution/3400-3499/3482.Analyze%20Organization%20Hierarchy/README_EN.md) @@ -16,7 +16,7 @@ tags: -

Table: Employees

+

表:Employees

 +----------------+---------+
@@ -28,30 +28,31 @@ tags:
 | salary         | int     |
 | department     | varchar |
 +----------------+----------+
-employee_id is the unique key for this table.
-Each row contains information about an employee, including their ID, name, their manager's ID, salary, and department.
-manager_id is null for the top-level manager (CEO).
+employee_id 是这张表的唯一主键。
+每一行包含关于一名员工的信息,包括他们的 ID,姓名,他们经理的 ID,薪水和部门。
+顶级经理(CEO)的 manager_id 是空的。
 
-

Write a solution to analyze the organizational hierarchy and answer the following:

+

编写一个解决方案来分析组织层级并回答下列问题:

    -
  1. Hierarchy Levels: For each employee, determine their level in the organization (CEO is level 1, employees reporting directly to the CEO are level 2, and so on).
  2. -
  3. Team Size: For each employee who is a manager, count the total number of employees under them (direct and indirect reports).
  4. -
  5. Salary Budget: For each manager, calculate the total salary budget they control (sum of salaries of all employees under them, including indirect reports, plus their own salary).
  6. +
  7. 层级:对于每名员工,确定他们在组织中的层级(CEO 层级为 1,CEO 的直接下属员工层级为 2,以此类推)。
  8. +
  9. 团队大小:对于每个是经理的员工,计算他们手下的(直接或间接下属)总员工数。
  10. +
  11. 薪资预算:对于每个经理,计算他们控制的总薪资预算(所有手下员工的工资总和,包括间接下属,加上自己的工资)。
-

Return the result table ordered by the result ordered by level in ascending order, then by budget in descending order, and finally by employee_name in ascending order.

+

返回结果表以 层级 升序 排序,然后以预算 降序 排序,最后以 employee_name 升序 排序。

-

The result format is in the following example.

+

结果格式如下所示。

 

-

Example:

+ +

示例:

-

Input:

+

输入:

-

Employees table:

+

Employees 表:

 +-------------+---------------+------------+--------+-------------+
@@ -70,7 +71,7 @@ manager_id is null for the top-level manager (CEO).
 +-------------+---------------+------------+--------+-------------+
 
-

Output:

+

输出:

 +-------------+---------------+-------+-----------+--------+
@@ -89,52 +90,52 @@ manager_id is null for the top-level manager (CEO).
 +-------------+---------------+-------+-----------+--------+
 
-

Explanation:

+

解释:

    -
  • Organization Structure: +
  • 组织结构:
      -
    • Alice (ID: 1) is the CEO (level 1) with no manager
    • -
    • Bob (ID: 2) and Charlie (ID: 3) report directly to Alice (level 2)
    • -
    • David (ID: 4), Eva (ID: 5) report to Bob, while Frank (ID: 6) and Grace (ID: 7) report to Charlie (level 3)
    • -
    • Hank (ID: 8) reports to David, and Ivy (ID: 9) and Judy (ID: 10) report to Frank (level 4)
    • +
    • Alice(ID:1)是 CEO(层级 1)没有经理。
    • +
    • Bob(ID:2)和 Charlie(ID:3)是 Alice 的直接下属(层级 2)
    • +
    • David(ID:4),Eva(ID:5)从属于 Bob,而 Frank(ID:6)和 Grace(ID:7)从属于 Charlie(层级 3)
    • +
    • Hank(ID:8)从属于 David,而 Ivy(ID:9)和 Judy(ID:10)从属于 Frank(层级 4)
  • -
  • Level Calculation: +
  • 层级计算:
      -
    • The CEO (Alice) is at level 1
    • -
    • Each subsequent level of management adds 1 to the level
    • +
    • CEO(Alice)层级为 1
    • +
    • 每个后续的管理层级都会使层级数加 1
  • -
  • Team Size Calculation: +
  • 团队大小计算:
      -
    • Alice has 9 employees under her (the entire company except herself)
    • -
    • Bob has 3 employees (David, Eva, and Hank)
    • -
    • Charlie has 4 employees (Frank, Grace, Ivy, and Judy)
    • -
    • David has 1 employee (Hank)
    • -
    • Frank has 2 employees (Ivy and Judy)
    • -
    • Eva, Grace, Hank, Ivy, and Judy have no direct reports (team_size = 0)
    • +
    • Alice 手下有 9 个员工(除她以外的整个公司)
    • +
    • Bob 手下有 3 个员工(David,Eva 和 Hank)
    • +
    • Charlie 手下有 4 个员工(Frank,Grace,Ivy 和 Judy)
    • +
    • David 手下有 1 个员工(Hank)
    • +
    • Frank 手下有 2 个员工(Ivy 和 Judy)
    • +
    • Eva,Grace,Hank,Ivy 和 Judy 没有直接下属(team_size = 0)
  • -
  • Budget Calculation: +
  • 预算计算:
      -
    • Alice's budget: Her salary (12000) + all employees' salaries (72500) = 84500
    • -
    • Charlie's budget: His salary (10000) + Frank's budget (23000) + Grace's salary (8500) = 41500
    • -
    • Bob's budget: His salary (10000) + David's budget (13500) + Eva's salary (7500) = 31000
    • -
    • Frank's budget: His salary (9000) + Ivy's salary (7000) + Judy's salary (7000) = 23000
    • -
    • David's budget: His salary (7500) + Hank's salary (6000) = 13500
    • -
    • Employees with no direct reports have budgets equal to their own salary
    • +
    • Alice 的预算:她的工资(12000)+ 所有员工的工资(72500)= 84500
    • +
    • Charlie 的预算:他的工资(10000)+ Frank 的预算(23000)+ Grace 的工资(8500)= 41500
    • +
    • Bob 的预算:他的工资 (10000) + David 的预算(13500)+ Eva 的工资(7500)= 31000
    • +
    • Frank 的预算:他的工资 (9000) + Ivy 的工资(7000)+ Judy 的工资(7000)= 23000
    • +
    • David 的预算:他的工资 (7500) + Hank 的工资(6000)= 13500
    • +
    • 没有直接下属的员工的预算等于他们自己的工资。
-

Note:

+

注意:

    -
  • The result is ordered first by level in ascending order
  • -
  • Within the same level, employees are ordered by budget in descending order then by name in ascending order
  • +
  • 结果先以层级升序排序
  • +
  • 在同一层级内,员工按预算降序排序,然后按姓名降序排序
diff --git a/solution/3400-3499/3491.Phone Number Prefix/README.md b/solution/3400-3499/3491.Phone Number Prefix/README.md index 332ea87b28f41..75f307df8a799 100644 --- a/solution/3400-3499/3491.Phone Number Prefix/README.md +++ b/solution/3400-3499/3491.Phone Number Prefix/README.md @@ -6,7 +6,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3491.Ph -# [3491. Phone Number Prefix 🔒](https://leetcode.cn/problems/phone-number-prefix) +# [3491. 电话号码前缀 🔒](https://leetcode.cn/problems/phone-number-prefix) [English Version](/solution/3400-3499/3491.Phone%20Number%20Prefix/README_EN.md) @@ -14,40 +14,42 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3491.Ph -

You are given a string array numbers that represents phone numbers. Return true if no phone number is a prefix of any other phone number; otherwise, return false.

+

给定一个字符串数组 numbers 表示电话号码。如果没有电话号码是任何其他电话号码的前缀,则返回 true;否则,返回 false

 

-

Example 1:

+ +

示例 1:

-

Input: numbers = ["1","2","4","3"]

+

输入:numbers = ["1","2","4","3"]

-

Output: true

+

输出:true

-

Explanation:

+

解释:

-

No number is a prefix of another number, so the output is true.

+

没有数字是其它数字的前缀,所以输出为 true

-

Example 2:

+

示例 2:

-

Input: numbers = ["001","007","15","00153"]

+

输入:numbers = ["001","007","15","00153"]

-

Output: false

+

输出:false

-

Explanation:

+

解释:

-

The string "001" is a prefix of the string "00153". Thus, the output is false.

+

字符串 "001" 是字符串 "00153" 的前缀。因此,输出是 false

 

-

Constraints:

+ +

提示:

  • 2 <= numbers.length <= 50
  • 1 <= numbers[i].length <= 50
  • -
  • All numbers contain only digits '0' to '9'.
  • +
  • 所有数字只包含 '0' 到 '9' 的数位。
diff --git a/solution/DATABASE_README.md b/solution/DATABASE_README.md index 8db7208bf0cb2..287497d6574af 100644 --- a/solution/DATABASE_README.md +++ b/solution/DATABASE_README.md @@ -312,7 +312,7 @@ | 3451 | [查找无效的 IP 地址](/solution/3400-3499/3451.Find%20Invalid%20IP%20Addresses/README.md) | `数据库` | 困难 | | | 3465 | [查找具有有效序列号的产品](/solution/3400-3499/3465.Find%20Products%20with%20Valid%20Serial%20Numbers/README.md) | `数据库` | 简单 | | | 3475 | [DNA 模式识别](/solution/3400-3499/3475.DNA%20Pattern%20Recognition/README.md) | | 中等 | | -| 3482 | [Analyze Organization Hierarchy](/solution/3400-3499/3482.Analyze%20Organization%20Hierarchy/README.md) | `数据库` | 困难 | | +| 3482 | [分析组织层级](/solution/3400-3499/3482.Analyze%20Organization%20Hierarchy/README.md) | `数据库` | 困难 | | ## 版权 diff --git a/solution/README.md b/solution/README.md index 67fc5557ac800..c6f5c32541829 100644 --- a/solution/README.md +++ b/solution/README.md @@ -3491,8 +3491,8 @@ | 3478 | [选出和最大的 K 个元素](/solution/3400-3499/3478.Choose%20K%20Elements%20With%20Maximum%20Sum/README.md) | `数组`,`排序`,`堆(优先队列)` | 中等 | 第 440 场周赛 | | 3479 | [将水果装入篮子 III](/solution/3400-3499/3479.Fruits%20Into%20Baskets%20III/README.md) | `线段树`,`数组`,`二分查找`,`有序集合` | 中等 | 第 440 场周赛 | | 3480 | [删除一个冲突对后最大子数组数目](/solution/3400-3499/3480.Maximize%20Subarrays%20After%20Removing%20One%20Conflicting%20Pair/README.md) | `线段树`,`数组`,`枚举`,`前缀和` | 困难 | 第 440 场周赛 | -| 3481 | [Apply Substitutions](/solution/3400-3499/3481.Apply%20Substitutions/README.md) | `深度优先搜索`,`广度优先搜索`,`图`,`拓扑排序`,`数组`,`哈希表`,`字符串` | 中等 | 🔒 | -| 3482 | [Analyze Organization Hierarchy](/solution/3400-3499/3482.Analyze%20Organization%20Hierarchy/README.md) | `数据库` | 困难 | | +| 3481 | [应用替换](/solution/3400-3499/3481.Apply%20Substitutions/README.md) | `深度优先搜索`,`广度优先搜索`,`图`,`拓扑排序`,`数组`,`哈希表`,`字符串` | 中等 | 🔒 | +| 3482 | [分析组织层级](/solution/3400-3499/3482.Analyze%20Organization%20Hierarchy/README.md) | `数据库` | 困难 | | | 3483 | [不同三位偶数的数目](/solution/3400-3499/3483.Unique%203-Digit%20Even%20Numbers/README.md) | `递归`,`数组`,`哈希表`,`枚举` | 简单 | 第 152 场双周赛 | | 3484 | [设计电子表格](/solution/3400-3499/3484.Design%20Spreadsheet/README.md) | `设计`,`数组`,`哈希表`,`字符串`,`矩阵` | 中等 | 第 152 场双周赛 | | 3485 | [删除元素后 K 个字符串的最长公共前缀](/solution/3400-3499/3485.Longest%20Common%20Prefix%20of%20K%20Strings%20After%20Removal/README.md) | `字典树`,`数组`,`字符串` | 困难 | 第 152 场双周赛 | @@ -3501,7 +3501,7 @@ | 3488 | [距离最小相等元素查询](/solution/3400-3499/3488.Closest%20Equal%20Element%20Queries/README.md) | `数组`,`哈希表`,`二分查找` | 中等 | 第 441 场周赛 | | 3489 | [零数组变换 IV](/solution/3400-3499/3489.Zero%20Array%20Transformation%20IV/README.md) | `数组`,`动态规划` | 中等 | 第 441 场周赛 | | 3490 | [统计美丽整数的数目](/solution/3400-3499/3490.Count%20Beautiful%20Numbers/README.md) | `动态规划` | 困难 | 第 441 场周赛 | -| 3491 | [Phone Number Prefix](/solution/3400-3499/3491.Phone%20Number%20Prefix/README.md) | | 简单 | 🔒 | +| 3491 | [电话号码前缀](/solution/3400-3499/3491.Phone%20Number%20Prefix/README.md) | | 简单 | 🔒 | ## 版权