From 03aa12e3d5fd13b0692569285ab28fe170235fe2 Mon Sep 17 00:00:00 2001 From: acbin <44314231+acbin@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:32:21 +0000 Subject: [PATCH] chore: update lc problems --- .../0200-0299/0264.Ugly Number II/README.md | 8 +++--- solution/0200-0299/0275.H-Index II/README.md | 14 +++++----- .../0400-0499/0484.Find Permutation/README.md | 2 +- .../README.md | 3 +- .../README_EN.md | 2 +- .../1159.Market Analysis II/README.md | 2 +- .../README_EN.md | 4 +-- .../README.md | 16 +++++------ .../README.md | 15 ++++++---- .../README_EN.md | 8 +++--- .../2561.Rearranging Fruits/README.md | 4 +-- .../2561.Rearranging Fruits/README_EN.md | 2 +- .../README.md" | 4 +-- .../README.md | 14 ++++++---- .../README.md | 2 +- .../README.md | 6 ++-- .../README_EN.md | 4 +-- solution/JAVASCRIPT_README.md | 2 +- solution/JAVASCRIPT_README_EN.md | 2 +- solution/README.md | 28 +++++++++---------- solution/README_EN.md | 28 +++++++++---------- 21 files changed, 87 insertions(+), 83 deletions(-) diff --git a/solution/0200-0299/0264.Ugly Number II/README.md b/solution/0200-0299/0264.Ugly Number II/README.md index 8f2322a1bd9f0..1d140f6be0b7d 100644 --- a/solution/0200-0299/0264.Ugly Number II/README.md +++ b/solution/0200-0299/0264.Ugly Number II/README.md @@ -8,9 +8,9 @@
给你一个整数 n
,请你找出并返回第 n
个 丑数 。
丑数 就是只包含质因数 2
、3
和/或 5
的正整数。
丑数 就是质因子只包含 2
、3
和 5
的正整数。
+
示例 1:
@@ -28,12 +28,12 @@ 解释:1 通常被视为丑数。 -+
提示:
1 <= n <= 1690
1 <= n <= 1690
给你一个整数数组 citations
,其中 citations[i]
表示研究者的第 i
篇论文被引用的次数,citations
已经按照 升序排列 。计算并返回该研究者的 h 指数。
h 指数的定义:h 代表“高引用次数”(high citations),一名科研人员的 h
指数是指他(她)的 (n
篇论文中)总共有 h
篇论文分别被引用了至少 h
次。
h 指数的定义:h 代表“高引用次数”(high citations),一名科研人员的 h
指数是指他(她)的 (n
篇论文中)至少 有 h
篇论文分别被引用了至少 h
次。
请你设计并实现对数时间复杂度的算法解决此问题。
@@ -17,16 +17,16 @@示例 1:
-输入+输入::
citations = [0,1,3,5,6]
-输出:3 -解释:给定数组表示研究者总共有5
篇论文,每篇论文相应的被引用了 0, 1, 3, 5, 6
次。 - 由于研究者有3
篇论文每篇 至少 被引用了3
次,其余两篇论文每篇被引用 不多于3
次,所以她的 h 指数是3
。
citations = [0,1,3,5,6]
+输出:3
+解释:给定数组表示研究者总共有 5
篇论文,每篇论文相应的被引用了 0, 1, 3, 5, 6
次。
+ 由于研究者有3
篇论文每篇 至少 被引用了 3
次,其余两篇论文每篇被引用 不多于 3
次,所以她的 h 指数是 3
。
示例 2:
-输入:citations = [1,2,100] -输出:2 +输入:citations = [1,2,100]
+输出:2
diff --git a/solution/0400-0499/0484.Find Permutation/README.md b/solution/0400-0499/0484.Find Permutation/README.md index a27f289254781..b943da33a7f0f 100644 --- a/solution/0400-0499/0484.Find Permutation/README.md +++ b/solution/0400-0499/0484.Find Permutation/README.md @@ -9,7 +9,7 @@
由范围 [1,n]
内所有整数组成的 n
个整数的排列 perm
可以表示为长度为 n - 1
的字符串 s
,其中:
perm[i] < perm[i + 1]
,那么 s[i] == ' i '
perm[i] < perm[i + 1]
,那么 s[i] == 'I'
perm[i] > perm[i + 1]
,那么 s[i] == 'D'
。free
存储为整数。请使用 ::boolean
将其转换为布尔格式。
该表的每一行表示第 i 个座位是否空闲。1 表示空闲,0 表示被占用。
diff --git a/solution/0600-0699/0603.Consecutive Available Seats/README_EN.md b/solution/0600-0699/0603.Consecutive Available Seats/README_EN.md index 05cc5b8b5d2fc..5e8fe0777303e 100644 --- a/solution/0600-0699/0603.Consecutive Available Seats/README_EN.md +++ b/solution/0600-0699/0603.Consecutive Available Seats/README_EN.md @@ -13,7 +13,7 @@ | seat_id | int | | free | bool | +-------------+------+ -In SQL, seat_id is an auto-increment primary key column for this table. +seat_id is an auto-increment column for this table. Each row of this table indicates whether the ith seat is free or not. 1 means free while 0 means occupied. diff --git a/solution/1100-1199/1159.Market Analysis II/README.md b/solution/1100-1199/1159.Market Analysis II/README.md index 34c62697099bb..56bf30f5a7751 100644 --- a/solution/1100-1199/1159.Market Analysis II/README.md +++ b/solution/1100-1199/1159.Market Analysis II/README.md @@ -51,7 +51,7 @@ item_id 是该表的主键(具有唯一值的列)。
-
编写一个解决方案,查找每个用户的加入日期和作为买家在 2019
年下的订单数。
编写一个解决方案,查找每个用户的加入日期和他们作为买家在 2019
年下的订单数。
以 任意顺序 返回结果表。
diff --git a/solution/1200-1299/1220.Count Vowels Permutation/README_EN.md b/solution/1200-1299/1220.Count Vowels Permutation/README_EN.md index 16c94e76c10a6..69d1abc3fee2f 100644 --- a/solution/1200-1299/1220.Count Vowels Permutation/README_EN.md +++ b/solution/1200-1299/1220.Count Vowels Permutation/README_EN.md @@ -12,10 +12,10 @@'e'
may only be followed by an 'a'
or an 'i'
.'i'
may not be followed by another 'i'
.'o'
may only be followed by an 'i'
or a 'u'
.'u'
may only be followed by an 'a'.
'u'
may only be followed by an 'a'
.Since the answer may be too large, return it modulo 10^9 + 7.
Since the answer may be too large, return it modulo 10^9 + 7
.
Example 1:
diff --git a/solution/1900-1999/1965.Employees With Missing Information/README.md b/solution/1900-1999/1965.Employees With Missing Information/README.md index ddf3b6ecf8a7a..32b09d9782d97 100644 --- a/solution/1900-1999/1965.Employees With Missing Information/README.md +++ b/solution/1900-1999/1965.Employees With Missing Information/README.md @@ -16,7 +16,7 @@ | name | varchar | +-------------+---------+ employee_id 是该表中具有唯一值的列。 -每一行表示雇员的id 和他的姓名。 +每一行表示雇员的 id 和他的姓名。表: Salaries
@@ -38,10 +38,10 @@ employee_id is 是该表中具有唯一值的列。
返回这些雇员的id employee_id
, 从小到大排序 。
返回这些雇员的 id employee_id
, 从小到大排序 。
查询结果格式如下面的例子所示。
@@ -75,9 +75,9 @@ Salaries table: | 2 | +-------------+ 解释: -雇员1,2,4,5 都工作在这个公司。 -1号雇员的姓名丢失了。 -2号雇员的薪水信息丢失了。 +雇员 1,2,4,5 都在这个公司工作。 +1 号雇员的姓名丢失了。 +2 号雇员的薪水信息丢失了。 ## 解法 diff --git a/solution/2100-2199/2127.Maximum Employees to Be Invited to a Meeting/README.md b/solution/2100-2199/2127.Maximum Employees to Be Invited to a Meeting/README.md index cb846b6479aa7..f4b3d04b5acb8 100644 --- a/solution/2100-2199/2127.Maximum Employees to Be Invited to a Meeting/README.md +++ b/solution/2100-2199/2127.Maximum Employees to Be Invited to a Meeting/README.md @@ -16,9 +16,10 @@示例 1:
-输入:favorite = [2,2,1,2] ++输入:favorite = [2,2,1,2] 输出:3 解释: 上图展示了公司邀请员工 0,1 和 2 参加会议以及他们在圆桌上的座位。 @@ -29,7 +30,8 @@示例 2:
-输入:favorite = [1,2,0] ++输入:favorite = [1,2,0] 输出:3 解释: 每个员工都至少是另一个员工喜欢的员工。所以公司邀请他们所有人参加会议的前提是所有人都参加了会议。 @@ -42,13 +44,14 @@示例 3:
-+
-
输入:favorite = [3,0,1,4,1] ++输入:favorite = [3,0,1,4,1] 输出:4 解释: 上图展示了公司可以邀请员工 0,1,3 和 4 参加会议以及他们在圆桌上的座位。 -员工 2 无法参加,因为他喜欢的员工 0 旁边的座位已经被占领了。 +员工 2 无法参加,因为他喜欢的员工 1 旁边的座位已经被占领了。 所以公司只能不邀请员工 2 。 参加会议的最多员工数目为 4 。diff --git a/solution/2100-2199/2171.Removing Minimum Number of Magic Beans/README_EN.md b/solution/2100-2199/2171.Removing Minimum Number of Magic Beans/README_EN.md index abe6ae572f061..aa9a59f654d68 100644 --- a/solution/2100-2199/2171.Removing Minimum Number of Magic Beans/README_EN.md +++ b/solution/2100-2199/2171.Removing Minimum Number of Magic Beans/README_EN.md @@ -14,15 +14,15 @@Example 1:
-Input: beans = [4,1,6,5] +Input: beans = [4,1,6,5] Output: 4 Explanation: - We remove 1 bean from the bag with only 1 bean. - This results in the remaining bags: [4,0,6,5] + This results in the remaining bags: [4,0,6,5] - Then we remove 2 beans from the bag with 6 beans. This results in the remaining bags: [4,0,4,5] - Then we remove 1 bean from the bag with 5 beans. - This results in the remaining bags: [4,0,4,4] + This results in the remaining bags: [4,0,4,4] We removed a total of 1 + 2 + 1 = 4 beans to make the remaining non-empty bags have an equal number of beans. There are no other solutions that remove 4 beans or fewer.@@ -30,7 +30,7 @@ There are no other solutions that remove 4 beans or fewer.Example 2:
-Input: beans = [2,10,3,2] +Input: beans = [2,10,3,2] Output: 7 Explanation: - We remove 2 beans from one of the bags with 2 beans. diff --git a/solution/2500-2599/2561.Rearranging Fruits/README.md b/solution/2500-2599/2561.Rearranging Fruits/README.md index 794da6b2bc8e3..f8668e2d068e9 100644 --- a/solution/2500-2599/2561.Rearranging Fruits/README.md +++ b/solution/2500-2599/2561.Rearranging Fruits/README.md @@ -6,9 +6,7 @@ -你有两个果篮,每个果篮中有
- -n
个水果。给你两个下标从 0 开始的整数数组basket1
和basket2
,用以表示两个果篮中每个水果的成本。你希望两个果篮相等。为此,可以根据需要多次执行下述操作:
+你有两个果篮,每个果篮中有
n
个水果。给你两个下标从 0 开始的整数数组basket1
和basket2
,用以表示两个果篮中每个水果的交换成本。为了让两个果篮中水果的数量相等。为此,可以根据需要多次执行下述操作:
i
和 j
,并交换 basket1
中的第 i
个水果和 basket2
中的第 j
个水果。Constraints:
basket1.length ==
basket2.length
basket1.length == basket2.length
1 <= basket1.length <= 105
1 <= basket1[i],basket2[i] <= 109
示例 1:
-输入:nums = [1,2,3,4] ++输入:nums = [1,2,3,4] 输出:21 -解释:nums 中共有 3 个特殊元素:nums[1] ,因为 4 被 1 整除;nums[2] ,因为 4 被 2 整除;以及 nums[4] ,因为 4 被 4 整除。 -因此,nums 中所有元素的平方和等于 nums[1] * nums[1] + nums[2] * nums[2] + nums[4] * nums[4] = 1 * 1 + 2 * 2 + 4 * 4 = 21 。 +解释:nums 中共有 3 个特殊元素:nums[1],因为 4 被 1 整除;nums[2],因为 4 被 2 整除;以及 nums[4],因为 4 被 4 整除。 +因此,nums 中所有特殊元素的平方和等于 nums[1] * nums[1] + nums[2] * nums[2] + nums[4] * nums[4] = 1 * 1 + 2 * 2 + 4 * 4 = 21 。示例 2:
-输入:nums = [2,7,1,19,18,3] ++输入:nums = [2,7,1,19,18,3] 输出:63 -解释:nums 中共有 4 个特殊元素:nums[1] ,因为 6 被 1 整除;nums[2] ,因为 6 被 2 整除;nums[3] ,因为 6 被 3 整除;以及 nums[6] ,因为 6 被 6 整除。 -因此,nums 中所有元素的平方和等于 nums[1] * nums[1] + nums[2] * nums[2] + nums[3] * nums[3] + nums[6] * nums[6] = 2 * 2 + 7 * 7 + 1 * 1 + 3 * 3 = 63 。+解释:nums 中共有 4 个特殊元素:nums[1],因为 6 被 1 整除;nums[2] ,因为 6 被 2 整除;nums[3],因为 6 被 3 整除;以及 nums[6],因为 6 被 6 整除。 +因此,nums 中所有特殊元素的平方和等于 nums[1] * nums[1] + nums[2] * nums[2] + nums[3] * nums[3] + nums[6] * nums[6] = 2 * 2 + 7 * 7 + 1 * 1 + 3 * 3 = 63 。diff --git a/solution/2900-2999/2919.Minimum Increment Operations to Make Array Beautiful/README.md b/solution/2900-2999/2919.Minimum Increment Operations to Make Array Beautiful/README.md index 1ccd2bda0c2d5..4ad4c1acf341c 100644 --- a/solution/2900-2999/2919.Minimum Increment Operations to Make Array Beautiful/README.md +++ b/solution/2900-2999/2919.Minimum Increment Operations to Make Array Beautiful/README.md @@ -11,7 +11,7 @@
你可以执行下述 递增 运算 任意 次(可以是 0 次):
[0, n - 1]
中选则一个下标 i
,并将 nums[i]
的值加 1
。[0, n - 1]
中选择一个下标 i
,并将 nums[i]
的值加 1
。如果数组中任何长度 大于或等于 3 的子数组,其 最大 元素都大于或等于 k
,则认为数组是一个 美丽数组 。
节点 0
处现有一棵由 n
个节点组成的无向树,节点编号从 0
到 n - 1
。给你一个长度为 n - 1
的二维 整数 数组 edges
,其中 edges[i] = [ai, bi]
表示在树上的节点 ai
和 bi
之间存在一条边。另给你一个下标从 0 开始、长度为 n
的数组 coins
和一个整数 k
,其中 coins[i]
表示节点 i
处的金币数量。
有一棵由 n
个节点组成的无向树,以 0
为根节点,节点编号从 0
到 n - 1
。给你一个长度为 n - 1
的二维 整数 数组 edges
,其中 edges[i] = [ai, bi]
表示在树上的节点 ai
和 bi
之间存在一条边。另给你一个下标从 0 开始、长度为 n
的数组 coins
和一个整数 k
,其中 coins[i]
表示节点 i
处的金币数量。
从根节点开始,你必须收集所有金币。要想收集节点上的金币,必须先收集该节点的祖先节点上的金币。
@@ -22,7 +22,7 @@
示例 1:
-输入:edges = [[0,1],[1,2],[2,3]], coins = [10,10,3,3], k = 5 输出:11 @@ -35,7 +35,7 @@
示例 2:
-输入:edges = [[0,1],[0,2]], coins = [8,4,4], k = 0 diff --git a/solution/2900-2999/2920.Maximum Points After Collecting Coins From All Nodes/README_EN.md b/solution/2900-2999/2920.Maximum Points After Collecting Coins From All Nodes/README_EN.md index 37ed176f0f042..c639f60947af1 100644 --- a/solution/2900-2999/2920.Maximum Points After Collecting Coins From All Nodes/README_EN.md +++ b/solution/2900-2999/2920.Maximum Points After Collecting Coins From All Nodes/README_EN.md @@ -19,7 +19,7 @@
Example 1:
-+
Input: edges = [[0,1],[1,2],[2,3]], coins = [10,10,3,3], k = 5 Output: 11 @@ -32,7 +32,7 @@ It can be shown that the maximum points we can get after collecting coins from aExample 2:
-+
Input: edges = [[0,1],[0,2]], coins = [8,4,4], k = 0 diff --git a/solution/JAVASCRIPT_README.md b/solution/JAVASCRIPT_README.md index 37b2eb93a6701..3f4d443a91359 100644 --- a/solution/JAVASCRIPT_README.md +++ b/solution/JAVASCRIPT_README.md @@ -24,7 +24,7 @@ | 2629 | [复合函数](/solution/2600-2699/2629.Function%20Composition/README.md) | | 简单 | | | 2630 | [记忆函数 II](/solution/2600-2699/2630.Memoize%20II/README.md) | | 困难 | | | 2631 | [分组](/solution/2600-2699/2631.Group%20By/README.md) | | 中等 | | -| 2632 | [柯里化](/solution/2600-2699/2632.Curry/README.md) | | 困难 | 🔒 | +| 2632 | [柯里化](/solution/2600-2699/2632.Curry/README.md) | | 中等 | 🔒 | | 2633 | [将对象转换为 JSON 字符串](/solution/2600-2699/2633.Convert%20Object%20to%20JSON%20String/README.md) | | 中等 | 🔒 | | 2634 | [过滤数组中的元素](/solution/2600-2699/2634.Filter%20Elements%20from%20Array/README.md) | | 简单 | | | 2635 | [转换数组中的每个元素](/solution/2600-2699/2635.Apply%20Transform%20Over%20Each%20Element%20in%20Array/README.md) | | 简单 | | diff --git a/solution/JAVASCRIPT_README_EN.md b/solution/JAVASCRIPT_README_EN.md index 84361d3bc3554..6d0c0dbc0b136 100644 --- a/solution/JAVASCRIPT_README_EN.md +++ b/solution/JAVASCRIPT_README_EN.md @@ -22,7 +22,7 @@ Press Control + F(or Command + F on | 2629 | [Function Composition](/solution/2600-2699/2629.Function%20Composition/README_EN.md) | | Easy | | | 2630 | [Memoize II](/solution/2600-2699/2630.Memoize%20II/README_EN.md) | | Hard | | | 2631 | [Group By](/solution/2600-2699/2631.Group%20By/README_EN.md) | | Medium | | -| 2632 | [Curry](/solution/2600-2699/2632.Curry/README_EN.md) | | Hard | 🔒 | +| 2632 | [Curry](/solution/2600-2699/2632.Curry/README_EN.md) | | Medium | 🔒 | | 2633 | [Convert Object to JSON String](/solution/2600-2699/2633.Convert%20Object%20to%20JSON%20String/README_EN.md) | | Medium | 🔒 | | 2634 | [Filter Elements from Array](/solution/2600-2699/2634.Filter%20Elements%20from%20Array/README_EN.md) | | Easy | | | 2635 | [Apply Transform Over Each Element in Array](/solution/2600-2699/2635.Apply%20Transform%20Over%20Each%20Element%20in%20Array/README_EN.md) | | Easy | | diff --git a/solution/README.md b/solution/README.md index a16e854124e59..4520e2376d46c 100644 --- a/solution/README.md +++ b/solution/README.md @@ -82,7 +82,7 @@ | 0069 | [x 的平方根 ](/solution/0000-0099/0069.Sqrt%28x%29/README.md) | `数学`,`二分查找` | 简单 | | | 0070 | [爬楼梯](/solution/0000-0099/0070.Climbing%20Stairs/README.md) | `记忆化搜索`,`数学`,`动态规划` | 简单 | | | 0071 | [简化路径](/solution/0000-0099/0071.Simplify%20Path/README.md) | `栈`,`字符串` | 中等 | | -| 0072 | [编辑距离](/solution/0000-0099/0072.Edit%20Distance/README.md) | `字符串`,`动态规划` | 困难 | | +| 0072 | [编辑距离](/solution/0000-0099/0072.Edit%20Distance/README.md) | `字符串`,`动态规划` | 中等 | | | 0073 | [矩阵置零](/solution/0000-0099/0073.Set%20Matrix%20Zeroes/README.md) | `数组`,`哈希表`,`矩阵` | 中等 | | | 0074 | [搜索二维矩阵](/solution/0000-0099/0074.Search%20a%202D%20Matrix/README.md) | `数组`,`二分查找`,`矩阵` | 中等 | | | 0075 | [颜色分类](/solution/0000-0099/0075.Sort%20Colors/README.md) | `数组`,`双指针`,`排序` | 中等 | | @@ -1493,7 +1493,7 @@ | 1480 | [一维数组的动态和](/solution/1400-1499/1480.Running%20Sum%20of%201d%20Array/README.md) | `数组`,`前缀和` | 简单 | 第 193 场周赛 | | 1481 | [不同整数的最少数目](/solution/1400-1499/1481.Least%20Number%20of%20Unique%20Integers%20after%20K%20Removals/README.md) | `贪心`,`数组`,`哈希表`,`计数`,`排序` | 中等 | 第 193 场周赛 | | 1482 | [制作 m 束花所需的最少天数](/solution/1400-1499/1482.Minimum%20Number%20of%20Days%20to%20Make%20m%20Bouquets/README.md) | `数组`,`二分查找` | 中等 | 第 193 场周赛 | -| 1483 | [树节点的第 K 个祖先](/solution/1400-1499/1483.Kth%20Ancestor%20of%20a%20Tree%20Node/README.md) | `树`,`深度优先搜索`,`广度优先搜索`,`设计`,`二分查找` | 困难 | 第 193 场周赛 | +| 1483 | [树节点的第 K 个祖先](/solution/1400-1499/1483.Kth%20Ancestor%20of%20a%20Tree%20Node/README.md) | `树`,`深度优先搜索`,`广度优先搜索`,`设计`,`二分查找`,`动态规划` | 困难 | 第 193 场周赛 | | 1484 | [按日期分组销售产品](/solution/1400-1499/1484.Group%20Sold%20Products%20By%20The%20Date/README.md) | `数据库` | 简单 | | | 1485 | [克隆含随机指针的二叉树](/solution/1400-1499/1485.Clone%20Binary%20Tree%20With%20Random%20Pointer/README.md) | `树`,`深度优先搜索`,`广度优先搜索`,`哈希表`,`二叉树` | 中等 | 🔒 | | 1486 | [数组异或操作](/solution/1400-1499/1486.XOR%20Operation%20in%20an%20Array/README.md) | `位运算`,`数学` | 简单 | 第 194 场周赛 | @@ -1660,7 +1660,7 @@ | 1647 | [字符频次唯一的最小删除次数](/solution/1600-1699/1647.Minimum%20Deletions%20to%20Make%20Character%20Frequencies%20Unique/README.md) | `贪心`,`哈希表`,`字符串`,`排序` | 中等 | 第 214 场周赛 | | 1648 | [销售价值减少的颜色球](/solution/1600-1699/1648.Sell%20Diminishing-Valued%20Colored%20Balls/README.md) | `贪心`,`数组`,`数学`,`二分查找`,`排序`,`堆(优先队列)` | 中等 | 第 214 场周赛 | | 1649 | [通过指令创建有序数组](/solution/1600-1699/1649.Create%20Sorted%20Array%20through%20Instructions/README.md) | `树状数组`,`线段树`,`数组`,`二分查找`,`分治`,`有序集合`,`归并排序` | 困难 | 第 214 场周赛 | -| 1650 | [二叉树的最近公共祖先 III](/solution/1600-1699/1650.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree%20III/README.md) | `树`,`哈希表`,`二叉树` | 中等 | 🔒 | +| 1650 | [二叉树的最近公共祖先 III](/solution/1600-1699/1650.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree%20III/README.md) | `树`,`哈希表`,`双指针`,`二叉树` | 中等 | 🔒 | | 1651 | [Hopper 公司查询 III](/solution/1600-1699/1651.Hopper%20Company%20Queries%20III/README.md) | `数据库` | 困难 | 🔒 | | 1652 | [拆炸弹](/solution/1600-1699/1652.Defuse%20the%20Bomb/README.md) | `数组` | 简单 | 第 39 场双周赛 | | 1653 | [使字符串平衡的最少删除次数](/solution/1600-1699/1653.Minimum%20Deletions%20to%20Make%20String%20Balanced/README.md) | `栈`,`字符串`,`动态规划` | 中等 | 第 39 场双周赛 | @@ -1686,7 +1686,7 @@ | 1673 | [找出最具竞争力的子序列](/solution/1600-1699/1673.Find%20the%20Most%20Competitive%20Subsequence/README.md) | `栈`,`贪心`,`数组`,`单调栈` | 中等 | 第 217 场周赛 | | 1674 | [使数组互补的最少操作次数](/solution/1600-1699/1674.Minimum%20Moves%20to%20Make%20Array%20Complementary/README.md) | `数组`,`哈希表`,`前缀和` | 中等 | 第 217 场周赛 | | 1675 | [数组的最小偏移量](/solution/1600-1699/1675.Minimize%20Deviation%20in%20Array/README.md) | `贪心`,`数组`,`有序集合`,`堆(优先队列)` | 困难 | 第 217 场周赛 | -| 1676 | [二叉树的最近公共祖先 IV](/solution/1600-1699/1676.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree%20IV/README.md) | `树`,`深度优先搜索`,`二叉树` | 中等 | 🔒 | +| 1676 | [二叉树的最近公共祖先 IV](/solution/1600-1699/1676.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree%20IV/README.md) | `树`,`深度优先搜索`,`哈希表`,`二叉树` | 中等 | 🔒 | | 1677 | [发票中的产品金额](/solution/1600-1699/1677.Product%27s%20Worth%20Over%20Invoices/README.md) | `数据库` | 简单 | 🔒 | | 1678 | [设计 Goal 解析器](/solution/1600-1699/1678.Goal%20Parser%20Interpretation/README.md) | `字符串` | 简单 | 第 218 场周赛 | | 1679 | [K 和数对的最大数目](/solution/1600-1699/1679.Max%20Number%20of%20K-Sum%20Pairs/README.md) | `数组`,`哈希表`,`双指针`,`排序` | 中等 | 第 218 场周赛 | @@ -2642,7 +2642,7 @@ | 2629 | [复合函数](/solution/2600-2699/2629.Function%20Composition/README.md) | | 简单 | | | 2630 | [记忆函数 II](/solution/2600-2699/2630.Memoize%20II/README.md) | | 困难 | | | 2631 | [分组](/solution/2600-2699/2631.Group%20By/README.md) | | 中等 | | -| 2632 | [柯里化](/solution/2600-2699/2632.Curry/README.md) | | 困难 | 🔒 | +| 2632 | [柯里化](/solution/2600-2699/2632.Curry/README.md) | | 中等 | 🔒 | | 2633 | [将对象转换为 JSON 字符串](/solution/2600-2699/2633.Convert%20Object%20to%20JSON%20String/README.md) | | 中等 | 🔒 | | 2634 | [过滤数组中的元素](/solution/2600-2699/2634.Filter%20Elements%20from%20Array/README.md) | | 简单 | | | 2635 | [转换数组中的每个元素](/solution/2600-2699/2635.Apply%20Transform%20Over%20Each%20Element%20in%20Array/README.md) | | 简单 | | @@ -2922,15 +2922,15 @@ | 2909 | [元素和最小的山形三元组 II](/solution/2900-2999/2909.Minimum%20Sum%20of%20Mountain%20Triplets%20II/README.md) | `数组` | 中等 | 第 368 场周赛 | | 2910 | [合法分组的最少组数](/solution/2900-2999/2910.Minimum%20Number%20of%20Groups%20to%20Create%20a%20Valid%20Assignment/README.md) | `贪心`,`数组`,`哈希表` | 中等 | 第 368 场周赛 | | 2911 | [得到 K 个半回文串的最少修改次数](/solution/2900-2999/2911.Minimum%20Changes%20to%20Make%20K%20Semi-palindromes/README.md) | `双指针`,`字符串`,`动态规划` | 困难 | 第 368 场周赛 | -| 2912 | [在网格上移动到目的地的方法数](/solution/2900-2999/2912.Number%20of%20Ways%20to%20Reach%20Destination%20in%20the%20Grid/README.md) | | 困难 | 🔒 | -| 2913 | [子数组不同元素数目的平方和 I](/solution/2900-2999/2913.Subarrays%20Distinct%20Element%20Sum%20of%20Squares%20I/README.md) | | 简单 | 第 116 场双周赛 | -| 2914 | [使二进制字符串变美丽的最少修改次数](/solution/2900-2999/2914.Minimum%20Number%20of%20Changes%20to%20Make%20Binary%20String%20Beautiful/README.md) | | 中等 | 第 116 场双周赛 | -| 2915 | [和为目标值的最长子序列的长度](/solution/2900-2999/2915.Length%20of%20the%20Longest%20Subsequence%20That%20Sums%20to%20Target/README.md) | | 中等 | 第 116 场双周赛 | -| 2916 | [子数组不同元素数目的平方和 II](/solution/2900-2999/2916.Subarrays%20Distinct%20Element%20Sum%20of%20Squares%20II/README.md) | | 困难 | 第 116 场双周赛 | -| 2917 | [找出数组中的 K-or 值](/solution/2900-2999/2917.Find%20the%20K-or%20of%20an%20Array/README.md) | | 简单 | 第 369 场周赛 | -| 2918 | [数组的最小相等和](/solution/2900-2999/2918.Minimum%20Equal%20Sum%20of%20Two%20Arrays%20After%20Replacing%20Zeros/README.md) | | 中等 | 第 369 场周赛 | -| 2919 | [使数组变美的最小增量运算数](/solution/2900-2999/2919.Minimum%20Increment%20Operations%20to%20Make%20Array%20Beautiful/README.md) | | 中等 | 第 369 场周赛 | -| 2920 | [收集所有金币可获得的最大积分](/solution/2900-2999/2920.Maximum%20Points%20After%20Collecting%20Coins%20From%20All%20Nodes/README.md) | | 困难 | 第 369 场周赛 | +| 2912 | [在网格上移动到目的地的方法数](/solution/2900-2999/2912.Number%20of%20Ways%20to%20Reach%20Destination%20in%20the%20Grid/README.md) | `数学`,`动态规划`,`组合数学` | 困难 | 🔒 | +| 2913 | [子数组不同元素数目的平方和 I](/solution/2900-2999/2913.Subarrays%20Distinct%20Element%20Sum%20of%20Squares%20I/README.md) | `数组`,`哈希表` | 简单 | 第 116 场双周赛 | +| 2914 | [使二进制字符串变美丽的最少修改次数](/solution/2900-2999/2914.Minimum%20Number%20of%20Changes%20to%20Make%20Binary%20String%20Beautiful/README.md) | `贪心`,`字符串` | 中等 | 第 116 场双周赛 | +| 2915 | [和为目标值的最长子序列的长度](/solution/2900-2999/2915.Length%20of%20the%20Longest%20Subsequence%20That%20Sums%20to%20Target/README.md) | `数组`,`动态规划` | 中等 | 第 116 场双周赛 | +| 2916 | [子数组不同元素数目的平方和 II](/solution/2900-2999/2916.Subarrays%20Distinct%20Element%20Sum%20of%20Squares%20II/README.md) | `树状数组`,`线段树`,`数组`,`动态规划` | 困难 | 第 116 场双周赛 | +| 2917 | [找出数组中的 K-or 值](/solution/2900-2999/2917.Find%20the%20K-or%20of%20an%20Array/README.md) | `位运算`,`数组` | 简单 | 第 369 场周赛 | +| 2918 | [数组的最小相等和](/solution/2900-2999/2918.Minimum%20Equal%20Sum%20of%20Two%20Arrays%20After%20Replacing%20Zeros/README.md) | `贪心`,`数组` | 中等 | 第 369 场周赛 | +| 2919 | [使数组变美的最小增量运算数](/solution/2900-2999/2919.Minimum%20Increment%20Operations%20to%20Make%20Array%20Beautiful/README.md) | `数组`,`动态规划` | 中等 | 第 369 场周赛 | +| 2920 | [收集所有金币可获得的最大积分](/solution/2900-2999/2920.Maximum%20Points%20After%20Collecting%20Coins%20From%20All%20Nodes/README.md) | `位运算`,`树`,`深度优先搜索`,`数组`,`动态规划` | 困难 | 第 369 场周赛 | | 2921 | [Maximum Profitable Triplets With Increasing Prices II](/solution/2900-2999/2921.Maximum%20Profitable%20Triplets%20With%20Increasing%20Prices%20II/README.md) | | 困难 | 🔒 | | 2922 | [Market Analysis III](/solution/2900-2999/2922.Market%20Analysis%20III/README.md) | | 中等 | 🔒 | diff --git a/solution/README_EN.md b/solution/README_EN.md index 7dacca89c3113..591eef1bb816f 100644 --- a/solution/README_EN.md +++ b/solution/README_EN.md @@ -80,7 +80,7 @@ Press Control + F(or Command + F on | 0069 | [Sqrt(x)](/solution/0000-0099/0069.Sqrt%28x%29/README_EN.md) | `Math`,`Binary Search` | Easy | | | 0070 | [Climbing Stairs](/solution/0000-0099/0070.Climbing%20Stairs/README_EN.md) | `Memoization`,`Math`,`Dynamic Programming` | Easy | | | 0071 | [Simplify Path](/solution/0000-0099/0071.Simplify%20Path/README_EN.md) | `Stack`,`String` | Medium | | -| 0072 | [Edit Distance](/solution/0000-0099/0072.Edit%20Distance/README_EN.md) | `String`,`Dynamic Programming` | Hard | | +| 0072 | [Edit Distance](/solution/0000-0099/0072.Edit%20Distance/README_EN.md) | `String`,`Dynamic Programming` | Medium | | | 0073 | [Set Matrix Zeroes](/solution/0000-0099/0073.Set%20Matrix%20Zeroes/README_EN.md) | `Array`,`Hash Table`,`Matrix` | Medium | | | 0074 | [Search a 2D Matrix](/solution/0000-0099/0074.Search%20a%202D%20Matrix/README_EN.md) | `Array`,`Binary Search`,`Matrix` | Medium | | | 0075 | [Sort Colors](/solution/0000-0099/0075.Sort%20Colors/README_EN.md) | `Array`,`Two Pointers`,`Sorting` | Medium | | @@ -1491,7 +1491,7 @@ Press Control + F(or Command + F on | 1480 | [Running Sum of 1d Array](/solution/1400-1499/1480.Running%20Sum%20of%201d%20Array/README_EN.md) | `Array`,`Prefix Sum` | Easy | Weekly Contest 193 | | 1481 | [Least Number of Unique Integers after K Removals](/solution/1400-1499/1481.Least%20Number%20of%20Unique%20Integers%20after%20K%20Removals/README_EN.md) | `Greedy`,`Array`,`Hash Table`,`Counting`,`Sorting` | Medium | Weekly Contest 193 | | 1482 | [Minimum Number of Days to Make m Bouquets](/solution/1400-1499/1482.Minimum%20Number%20of%20Days%20to%20Make%20m%20Bouquets/README_EN.md) | `Array`,`Binary Search` | Medium | Weekly Contest 193 | -| 1483 | [Kth Ancestor of a Tree Node](/solution/1400-1499/1483.Kth%20Ancestor%20of%20a%20Tree%20Node/README_EN.md) | `Tree`,`Depth-First Search`,`Breadth-First Search`,`Design`,`Binary Search` | Hard | Weekly Contest 193 | +| 1483 | [Kth Ancestor of a Tree Node](/solution/1400-1499/1483.Kth%20Ancestor%20of%20a%20Tree%20Node/README_EN.md) | `Tree`,`Depth-First Search`,`Breadth-First Search`,`Design`,`Binary Search`,`Dynamic Programming` | Hard | Weekly Contest 193 | | 1484 | [Group Sold Products By The Date](/solution/1400-1499/1484.Group%20Sold%20Products%20By%20The%20Date/README_EN.md) | `Database` | Easy | | | 1485 | [Clone Binary Tree With Random Pointer](/solution/1400-1499/1485.Clone%20Binary%20Tree%20With%20Random%20Pointer/README_EN.md) | `Tree`,`Depth-First Search`,`Breadth-First Search`,`Hash Table`,`Binary Tree` | Medium | 🔒 | | 1486 | [XOR Operation in an Array](/solution/1400-1499/1486.XOR%20Operation%20in%20an%20Array/README_EN.md) | `Bit Manipulation`,`Math` | Easy | Weekly Contest 194 | @@ -1658,7 +1658,7 @@ Press Control + F(or Command + F on | 1647 | [Minimum Deletions to Make Character Frequencies Unique](/solution/1600-1699/1647.Minimum%20Deletions%20to%20Make%20Character%20Frequencies%20Unique/README_EN.md) | `Greedy`,`Hash Table`,`String`,`Sorting` | Medium | Weekly Contest 214 | | 1648 | [Sell Diminishing-Valued Colored Balls](/solution/1600-1699/1648.Sell%20Diminishing-Valued%20Colored%20Balls/README_EN.md) | `Greedy`,`Array`,`Math`,`Binary Search`,`Sorting`,`Heap (Priority Queue)` | Medium | Weekly Contest 214 | | 1649 | [Create Sorted Array through Instructions](/solution/1600-1699/1649.Create%20Sorted%20Array%20through%20Instructions/README_EN.md) | `Binary Indexed Tree`,`Segment Tree`,`Array`,`Binary Search`,`Divide and Conquer`,`Ordered Set`,`Merge Sort` | Hard | Weekly Contest 214 | -| 1650 | [Lowest Common Ancestor of a Binary Tree III](/solution/1600-1699/1650.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree%20III/README_EN.md) | `Tree`,`Hash Table`,`Binary Tree` | Medium | 🔒 | +| 1650 | [Lowest Common Ancestor of a Binary Tree III](/solution/1600-1699/1650.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree%20III/README_EN.md) | `Tree`,`Hash Table`,`Two Pointers`,`Binary Tree` | Medium | 🔒 | | 1651 | [Hopper Company Queries III](/solution/1600-1699/1651.Hopper%20Company%20Queries%20III/README_EN.md) | `Database` | Hard | 🔒 | | 1652 | [Defuse the Bomb](/solution/1600-1699/1652.Defuse%20the%20Bomb/README_EN.md) | `Array` | Easy | Biweekly Contest 39 | | 1653 | [Minimum Deletions to Make String Balanced](/solution/1600-1699/1653.Minimum%20Deletions%20to%20Make%20String%20Balanced/README_EN.md) | `Stack`,`String`,`Dynamic Programming` | Medium | Biweekly Contest 39 | @@ -1684,7 +1684,7 @@ Press Control + F(or Command + F on | 1673 | [Find the Most Competitive Subsequence](/solution/1600-1699/1673.Find%20the%20Most%20Competitive%20Subsequence/README_EN.md) | `Stack`,`Greedy`,`Array`,`Monotonic Stack` | Medium | Weekly Contest 217 | | 1674 | [Minimum Moves to Make Array Complementary](/solution/1600-1699/1674.Minimum%20Moves%20to%20Make%20Array%20Complementary/README_EN.md) | `Array`,`Hash Table`,`Prefix Sum` | Medium | Weekly Contest 217 | | 1675 | [Minimize Deviation in Array](/solution/1600-1699/1675.Minimize%20Deviation%20in%20Array/README_EN.md) | `Greedy`,`Array`,`Ordered Set`,`Heap (Priority Queue)` | Hard | Weekly Contest 217 | -| 1676 | [Lowest Common Ancestor of a Binary Tree IV](/solution/1600-1699/1676.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree%20IV/README_EN.md) | `Tree`,`Depth-First Search`,`Binary Tree` | Medium | 🔒 | +| 1676 | [Lowest Common Ancestor of a Binary Tree IV](/solution/1600-1699/1676.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree%20IV/README_EN.md) | `Tree`,`Depth-First Search`,`Hash Table`,`Binary Tree` | Medium | 🔒 | | 1677 | [Product's Worth Over Invoices](/solution/1600-1699/1677.Product%27s%20Worth%20Over%20Invoices/README_EN.md) | `Database` | Easy | 🔒 | | 1678 | [Goal Parser Interpretation](/solution/1600-1699/1678.Goal%20Parser%20Interpretation/README_EN.md) | `String` | Easy | Weekly Contest 218 | | 1679 | [Max Number of K-Sum Pairs](/solution/1600-1699/1679.Max%20Number%20of%20K-Sum%20Pairs/README_EN.md) | `Array`,`Hash Table`,`Two Pointers`,`Sorting` | Medium | Weekly Contest 218 | @@ -2640,7 +2640,7 @@ Press Control + F(or Command + F on | 2629 | [Function Composition](/solution/2600-2699/2629.Function%20Composition/README_EN.md) | | Easy | | | 2630 | [Memoize II](/solution/2600-2699/2630.Memoize%20II/README_EN.md) | | Hard | | | 2631 | [Group By](/solution/2600-2699/2631.Group%20By/README_EN.md) | | Medium | | -| 2632 | [Curry](/solution/2600-2699/2632.Curry/README_EN.md) | | Hard | 🔒 | +| 2632 | [Curry](/solution/2600-2699/2632.Curry/README_EN.md) | | Medium | 🔒 | | 2633 | [Convert Object to JSON String](/solution/2600-2699/2633.Convert%20Object%20to%20JSON%20String/README_EN.md) | | Medium | 🔒 | | 2634 | [Filter Elements from Array](/solution/2600-2699/2634.Filter%20Elements%20from%20Array/README_EN.md) | | Easy | | | 2635 | [Apply Transform Over Each Element in Array](/solution/2600-2699/2635.Apply%20Transform%20Over%20Each%20Element%20in%20Array/README_EN.md) | | Easy | | @@ -2920,15 +2920,15 @@ Press Control + F(or Command + F on | 2909 | [Minimum Sum of Mountain Triplets II](/solution/2900-2999/2909.Minimum%20Sum%20of%20Mountain%20Triplets%20II/README_EN.md) | `Array` | Medium | Weekly Contest 368 | | 2910 | [Minimum Number of Groups to Create a Valid Assignment](/solution/2900-2999/2910.Minimum%20Number%20of%20Groups%20to%20Create%20a%20Valid%20Assignment/README_EN.md) | `Greedy`,`Array`,`Hash Table` | Medium | Weekly Contest 368 | | 2911 | [Minimum Changes to Make K Semi-palindromes](/solution/2900-2999/2911.Minimum%20Changes%20to%20Make%20K%20Semi-palindromes/README_EN.md) | `Two Pointers`,`String`,`Dynamic Programming` | Hard | Weekly Contest 368 | -| 2912 | [Number of Ways to Reach Destination in the Grid](/solution/2900-2999/2912.Number%20of%20Ways%20to%20Reach%20Destination%20in%20the%20Grid/README_EN.md) | | Hard | 🔒 | -| 2913 | [Subarrays Distinct Element Sum of Squares I](/solution/2900-2999/2913.Subarrays%20Distinct%20Element%20Sum%20of%20Squares%20I/README_EN.md) | | Easy | Biweekly Contest 116 | -| 2914 | [Minimum Number of Changes to Make Binary String Beautiful](/solution/2900-2999/2914.Minimum%20Number%20of%20Changes%20to%20Make%20Binary%20String%20Beautiful/README_EN.md) | | Medium | Biweekly Contest 116 | -| 2915 | [Length of the Longest Subsequence That Sums to Target](/solution/2900-2999/2915.Length%20of%20the%20Longest%20Subsequence%20That%20Sums%20to%20Target/README_EN.md) | | Medium | Biweekly Contest 116 | -| 2916 | [Subarrays Distinct Element Sum of Squares II](/solution/2900-2999/2916.Subarrays%20Distinct%20Element%20Sum%20of%20Squares%20II/README_EN.md) | | Hard | Biweekly Contest 116 | -| 2917 | [Find the K-or of an Array](/solution/2900-2999/2917.Find%20the%20K-or%20of%20an%20Array/README_EN.md) | | Easy | Weekly Contest 369 | -| 2918 | [Minimum Equal Sum of Two Arrays After Replacing Zeros](/solution/2900-2999/2918.Minimum%20Equal%20Sum%20of%20Two%20Arrays%20After%20Replacing%20Zeros/README_EN.md) | | Medium | Weekly Contest 369 | -| 2919 | [Minimum Increment Operations to Make Array Beautiful](/solution/2900-2999/2919.Minimum%20Increment%20Operations%20to%20Make%20Array%20Beautiful/README_EN.md) | | Medium | Weekly Contest 369 | -| 2920 | [Maximum Points After Collecting Coins From All Nodes](/solution/2900-2999/2920.Maximum%20Points%20After%20Collecting%20Coins%20From%20All%20Nodes/README_EN.md) | | Hard | Weekly Contest 369 | +| 2912 | [Number of Ways to Reach Destination in the Grid](/solution/2900-2999/2912.Number%20of%20Ways%20to%20Reach%20Destination%20in%20the%20Grid/README_EN.md) | `Math`,`Dynamic Programming`,`Combinatorics` | Hard | 🔒 | +| 2913 | [Subarrays Distinct Element Sum of Squares I](/solution/2900-2999/2913.Subarrays%20Distinct%20Element%20Sum%20of%20Squares%20I/README_EN.md) | `Array`,`Hash Table` | Easy | Biweekly Contest 116 | +| 2914 | [Minimum Number of Changes to Make Binary String Beautiful](/solution/2900-2999/2914.Minimum%20Number%20of%20Changes%20to%20Make%20Binary%20String%20Beautiful/README_EN.md) | `Greedy`,`String` | Medium | Biweekly Contest 116 | +| 2915 | [Length of the Longest Subsequence That Sums to Target](/solution/2900-2999/2915.Length%20of%20the%20Longest%20Subsequence%20That%20Sums%20to%20Target/README_EN.md) | `Array`,`Dynamic Programming` | Medium | Biweekly Contest 116 | +| 2916 | [Subarrays Distinct Element Sum of Squares II](/solution/2900-2999/2916.Subarrays%20Distinct%20Element%20Sum%20of%20Squares%20II/README_EN.md) | `Binary Indexed Tree`,`Segment Tree`,`Array`,`Dynamic Programming` | Hard | Biweekly Contest 116 | +| 2917 | [Find the K-or of an Array](/solution/2900-2999/2917.Find%20the%20K-or%20of%20an%20Array/README_EN.md) | `Bit Manipulation`,`Array` | Easy | Weekly Contest 369 | +| 2918 | [Minimum Equal Sum of Two Arrays After Replacing Zeros](/solution/2900-2999/2918.Minimum%20Equal%20Sum%20of%20Two%20Arrays%20After%20Replacing%20Zeros/README_EN.md) | `Greedy`,`Array` | Medium | Weekly Contest 369 | +| 2919 | [Minimum Increment Operations to Make Array Beautiful](/solution/2900-2999/2919.Minimum%20Increment%20Operations%20to%20Make%20Array%20Beautiful/README_EN.md) | `Array`,`Dynamic Programming` | Medium | Weekly Contest 369 | +| 2920 | [Maximum Points After Collecting Coins From All Nodes](/solution/2900-2999/2920.Maximum%20Points%20After%20Collecting%20Coins%20From%20All%20Nodes/README_EN.md) | `Bit Manipulation`,`Tree`,`Depth-First Search`,`Array`,`Dynamic Programming` | Hard | Weekly Contest 369 | | 2921 | [Maximum Profitable Triplets With Increasing Prices II](/solution/2900-2999/2921.Maximum%20Profitable%20Triplets%20With%20Increasing%20Prices%20II/README_EN.md) | | Hard | 🔒 | | 2922 | [Market Analysis III](/solution/2900-2999/2922.Market%20Analysis%20III/README_EN.md) | | Medium | 🔒 |