From 07e5b1943b664e72286a7914101d4d368962ea2e Mon Sep 17 00:00:00 2001 From: Yang Libin Date: Tue, 10 Oct 2023 00:10:14 +0000 Subject: [PATCH 1/2] chore: update lc problems --- .github/workflows/pretter-lint.yml | 22 --------------- .../README.md | 4 +-- .../README.md | 19 +++++++------ .../README.md | 15 +++++----- solution/2800-2899/2880.Select Data/README.md | 18 ++++++------ .../2881.Create a New Column/README.md | 2 +- .../2889.Reshape Data Pivot/README.md | 17 +++++------ .../2800-2899/2891.Method Chaining/README.md | 28 ++++++++++--------- solution/README.md | 10 +++---- solution/summary.md | 10 +++---- 10 files changed, 65 insertions(+), 80 deletions(-) delete mode 100644 .github/workflows/pretter-lint.yml diff --git a/.github/workflows/pretter-lint.yml b/.github/workflows/pretter-lint.yml deleted file mode 100644 index e4d2fb03c592c..0000000000000 --- a/.github/workflows/pretter-lint.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: prettier-linter - -on: - push: {} - pull_request: {} - -jobs: - prettier: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - - name: Prettify code - uses: creyD/prettier_action@v4.3 - with: - prettier_options: --write **/*.{md,js,ts} - only_changed: True \ No newline at end of file diff --git a/solution/2800-2899/2877.Create a DataFrame from List/README.md b/solution/2800-2899/2877.Create a DataFrame from List/README.md index 613e740a9d9ea..e80f1bfe99b57 100644 --- a/solution/2800-2899/2877.Create a DataFrame from List/README.md +++ b/solution/2800-2899/2877.Create a DataFrame from List/README.md @@ -6,7 +6,7 @@ -

编写一个解决方案,从名为  student_data 的二维列表 创建 一个 DataFrame 。这个二维列表包含一些学生的 ID 和年龄信息。

+

编写一个解决方案,基于名为  student_data 的二维列表 创建 一个 DataFrame 。这个二维列表包含一些学生的 ID 和年龄信息。

DataFrame 应该有两列, student_id 和 age,并且与原始二维列表的顺序相同。

@@ -35,7 +35,7 @@ | 4 | 20 | +------------+-----+ 解释: -在 student_data 上创建了一个 DataFrame,包含 student_id 和 age 两列。 +基于 student_data 创建了一个 DataFrame,包含 student_id 和 age 两列。 ## 解法 diff --git a/solution/2800-2899/2878.Get the Size of a DataFrame/README.md b/solution/2800-2899/2878.Get the Size of a DataFrame/README.md index 363c9beb038c9..4111d79eb677f 100644 --- a/solution/2800-2899/2878.Get the Size of a DataFrame/README.md +++ b/solution/2800-2899/2878.Get the Size of a DataFrame/README.md @@ -1,4 +1,4 @@ -# [2878. Get the Size of a DataFrame](https://leetcode.cn/problems/get-the-size-of-a-dataframe) +# [2878. 获取 DataFrame 的大小](https://leetcode.cn/problems/get-the-size-of-a-dataframe) [English Version](/solution/2800-2899/2878.Get%20the%20Size%20of%20a%20DataFrame/README_EN.md) @@ -19,19 +19,20 @@ DataFrame players: +-------------+--------+ -

Write a solution to calculate and display the number of rows and columns of players.

+

编写一个解决方案,计算并显示 players 的 行数和列数

-

Return the result as an array:

+

将结果返回为一个数组:

[number of rows, number of columns]

-

The result format is in the following example.

+

返回结果格式如下示例所示。

 

-

Example 1:

+ +

示例 1:

-Input:
+输入:
 +-----------+----------+-----+-------------+--------------------+
 | player_id | name     | age | position    | team               |
 +-----------+----------+-----+-------------+--------------------+
@@ -46,10 +47,10 @@ DataFrame players:
 | 761       | Jack     | 33  | Midfielder  | ManchesterCity     |
 | 642       | Charlie  | 36  | Center-back | Arsenal            |
 +-----------+----------+-----+-------------+--------------------+
-Output:
+输出:
 [10, 5]
-Explanation:
-This DataFrame contains 10 rows and 5 columns.
+解释:
+这个 DataFrame 包含 10 行和 5 列。
 
## 解法 diff --git a/solution/2800-2899/2879.Display the First Three Rows/README.md b/solution/2800-2899/2879.Display the First Three Rows/README.md index 6e5cbb2f7cfcf..c6173d2b1c480 100644 --- a/solution/2800-2899/2879.Display the First Three Rows/README.md +++ b/solution/2800-2899/2879.Display the First Three Rows/README.md @@ -1,4 +1,4 @@ -# [2879. Display the First Three Rows](https://leetcode.cn/problems/display-the-first-three-rows) +# [2879. 显示前三行](https://leetcode.cn/problems/display-the-first-three-rows) [English Version](/solution/2800-2899/2879.Display%20the%20First%20Three%20Rows/README_EN.md) @@ -18,13 +18,14 @@ DataFrame: employees +-------------+--------+ -

Write a solution to display the first 3 rows of this DataFrame.

+

编写一个解决方案,显示这个 DataFrame 的 前  3 行。

 

-

Example 1:

+ +

示例 1:

-Input:
+输入:
 DataFrame employees
 +-------------+-----------+-----------------------+--------+
 | employee_id | name      | department            | salary |
@@ -36,7 +37,7 @@ DataFrame: employees
 | 49          | Jonathan  | HumanResources        | 23793  |
 | 43          | Khaled    | Administration        | 40454  |
 +-------------+-----------+-----------------------+--------+
-Output:
+输出:
 +-------------+---------+-------------+--------+
 | employee_id | name    | department  | salary |
 +-------------+---------+-------------+--------+
@@ -44,8 +45,8 @@ DataFrame: employees
 | 90          | Alice   | Sales       | 11096  |
 | 9           | Tatiana | Engineering | 33805  |
 +-------------+---------+-------------+--------+
-Explanation: 
-Only the first 3 rows are displayed.
+解释: +只有前 3 行被显示。 ## 解法 diff --git a/solution/2800-2899/2880.Select Data/README.md b/solution/2800-2899/2880.Select Data/README.md index 82c36ed2f1716..aa70284dbaa9b 100644 --- a/solution/2800-2899/2880.Select Data/README.md +++ b/solution/2800-2899/2880.Select Data/README.md @@ -1,4 +1,4 @@ -# [2880. Select Data](https://leetcode.cn/problems/select-data) +# [2880. 数据选取](https://leetcode.cn/problems/select-data) [English Version](/solution/2800-2899/2880.Select%20Data/README_EN.md) @@ -18,14 +18,16 @@ DataFrame students -

Write a solution to select the name and age of the student with student_id = 101.

+

编写一个解决方案,选择 student_id = 101 的学生的 name 和 age 并输出。

-

The result format is in the following example.

+

返回结果格式如下示例所示。

 

+ +

示例 1:

+
-Example 1:
-Input:
+输入:
 +------------+---------+-----+
 | student_id | name    | age |
 +------------+---------+-----+
@@ -34,14 +36,14 @@ Input:
 | 128        | Henry   | 6   |
 | 3          | Henry   | 11  |
 +------------+---------+-----+
-Output:
+输出:
 +---------+-----+
 | name    | age | 
 +---------+-----+
 | Ulysses | 13  |
 +---------+-----+
-Explanation:
-Student Ulysses has student_id = 101, we select the name and age.
+解释: +学生 Ulysses 的 student_id = 101,所以我们输出了他的 name 和 age。 ## 解法 diff --git a/solution/2800-2899/2881.Create a New Column/README.md b/solution/2800-2899/2881.Create a New Column/README.md index f821932e9de3c..9fbc58b838651 100644 --- a/solution/2800-2899/2881.Create a New Column/README.md +++ b/solution/2800-2899/2881.Create a New Column/README.md @@ -51,7 +51,7 @@ DataFrame employees | Thomas | 24433 | 48866 | +---------+--------+--------+ 解释: -通过将salary列中的值加倍创建了一个新的bonus列。 +通过将 salary 列中的值加倍创建了一个新的 bonus 列。 ## 解法 diff --git a/solution/2800-2899/2889.Reshape Data Pivot/README.md b/solution/2800-2899/2889.Reshape Data Pivot/README.md index e53377ebe74c5..ea74b85951689 100644 --- a/solution/2800-2899/2889.Reshape Data Pivot/README.md +++ b/solution/2800-2899/2889.Reshape Data Pivot/README.md @@ -1,4 +1,4 @@ -# [2889. Reshape Data Pivot](https://leetcode.cn/problems/reshape-data-pivot) +# [2889. 数据重塑:透视](https://leetcode.cn/problems/reshape-data-pivot) [English Version](/solution/2800-2899/2889.Reshape%20Data%20Pivot/README_EN.md) @@ -17,14 +17,15 @@ DataFrame weather +-------------+--------+ -

Write a solution to pivot the data so that each row represents temperatures for a specific month, and each city is a separate column.

+

编写一个解决方案,以便将数据 旋转,使得每一行代表特定月份的温度,而每个城市都是一个单独的列。

-

The result format is in the following example.

+

输出结果格式如下示例所示。

 

+示例 1: +
-Example 1:
-Input:
+输入:
 +--------------+----------+-------------+
 | city         | month    | temperature |
 +--------------+----------+-------------+
@@ -39,7 +40,7 @@ DataFrame weather
 | ElPaso       | April    | 2           |
 | ElPaso       | May      | 43          |
 +--------------+----------+-------------+
-Output:
+输出:
 +----------+--------+--------------+
 | month    | ElPaso | Jacksonville |
 +----------+--------+--------------+
@@ -49,8 +50,8 @@ DataFrame weather
 | March    | 26     | 38           |
 | May      | 43     | 34           |
 +----------+--------+--------------+
-Explanation:
-The table is pivoted, each column represents a city, and each row represents a specific month.
+解释: +表格被旋转,每一列代表一个城市,每一行代表特定的月份。 ## 解法 diff --git a/solution/2800-2899/2891.Method Chaining/README.md b/solution/2800-2899/2891.Method Chaining/README.md index a96a6ae67c944..4da0cb5c9db3a 100644 --- a/solution/2800-2899/2891.Method Chaining/README.md +++ b/solution/2800-2899/2891.Method Chaining/README.md @@ -1,4 +1,4 @@ -# [2891. Method Chaining](https://leetcode.cn/problems/method-chaining) +# [2891. 方法链](https://leetcode.cn/problems/method-chaining) [English Version](/solution/2800-2899/2891.Method%20Chaining/README_EN.md) @@ -18,17 +18,18 @@ DataFrame animals +-------------+--------+ -

Write a solution to list the names of animals that weigh strictly more than 100 kilograms.

+

编写一个解决方案来列出体重 严格超过  100  千克的动物的名称。

-

Return the animals sorted by weight in descending order.

+

按体重 降序 返回动物。

-

The result format is in the following example.

+

返回结果格式如下示例所示。

 

-

Example 1:

+ +

示例 1:

-Input: 
+输入:
 DataFrame animals:
 +----------+---------+-----+--------+
 | name     | species | age | weight |
@@ -40,7 +41,7 @@ DataFrame animals:
 | Stefan   | Bear    | 100 | 50     |
 | Tommy    | Panda   | 26  | 349    |
 +----------+---------+-----+--------+
-Output: 
+输出:
 +----------+
 | name     |
 +----------+
@@ -49,15 +50,16 @@ DataFrame animals:
 | Tommy    |
 | Alex     |
 +----------+
-Explanation: 
-All animals weighing more than 100 should be included in the results table.
-Tatiana's weight is 464, Jonathan's weight is 463, Tommy's weight is 349, and Alex's weight is 328.
-The results should be sorted in descending order of weight.
+解释: +所有体重超过 100 的动物都应包含在结果表中。 +Tatiana 的体重为 464,Jonathan 的体重为 463,Tommy 的体重为 349,Alex 的体重为 328。 +结果应按体重降序排序。

 

-

In Pandas, method chaining enables us to perform operations on a DataFrame without breaking up each operation into a separate line or creating multiple temporary variables. 

-

Can you complete this task in just one line of code using method chaining?

+

在 Pandas 中,方法链 允许我们在 DataFrame 上执行操作,而无需将每个操作拆分成单独的行或创建多个临时变量。

+ +

你能用 一行 代码的方法链完成这个任务吗?

## 解法 diff --git a/solution/README.md b/solution/README.md index f06860479f5f7..88bad520d9390 100644 --- a/solution/README.md +++ b/solution/README.md @@ -2888,9 +2888,9 @@ | 2875 | [无限数组的最短子数组](/solution/2800-2899/2875.Minimum%20Size%20Subarray%20in%20Infinite%20Array/README.md) | `数组`,`哈希表`,`前缀和`,`滑动窗口` | 中等 | 第 365 场周赛 | | 2876 | [有向图访问计数](/solution/2800-2899/2876.Count%20Visited%20Nodes%20in%20a%20Directed%20Graph/README.md) | `图`,`记忆化搜索`,`动态规划` | 困难 | 第 365 场周赛 | | 2877 | [从表中创建 DataFrame](/solution/2800-2899/2877.Create%20a%20DataFrame%20from%20List/README.md) | | 简单 | | -| 2878 | [Get the Size of a DataFrame](/solution/2800-2899/2878.Get%20the%20Size%20of%20a%20DataFrame/README.md) | | 简单 | | -| 2879 | [Display the First Three Rows](/solution/2800-2899/2879.Display%20the%20First%20Three%20Rows/README.md) | | 简单 | | -| 2880 | [Select Data](/solution/2800-2899/2880.Select%20Data/README.md) | | 简单 | | +| 2878 | [获取 DataFrame 的大小](/solution/2800-2899/2878.Get%20the%20Size%20of%20a%20DataFrame/README.md) | | 简单 | | +| 2879 | [显示前三行](/solution/2800-2899/2879.Display%20the%20First%20Three%20Rows/README.md) | | 简单 | | +| 2880 | [数据选取](/solution/2800-2899/2880.Select%20Data/README.md) | | 简单 | | | 2881 | [创建新列](/solution/2800-2899/2881.Create%20a%20New%20Column/README.md) | | 简单 | | | 2882 | [删去重复的行](/solution/2800-2899/2882.Drop%20Duplicate%20Rows/README.md) | | 简单 | | | 2883 | [删去丢失的数据](/solution/2800-2899/2883.Drop%20Missing%20Data/README.md) | | 简单 | | @@ -2899,9 +2899,9 @@ | 2886 | [改变数据类型](/solution/2800-2899/2886.Change%20Data%20Type/README.md) | | 简单 | | | 2887 | [填充缺失值](/solution/2800-2899/2887.Fill%20Missing%20Data/README.md) | | 简单 | | | 2888 | [重塑数据:连结](/solution/2800-2899/2888.Reshape%20Data%20Concatenate/README.md) | | 简单 | | -| 2889 | [Reshape Data Pivot](/solution/2800-2899/2889.Reshape%20Data%20Pivot/README.md) | | 简单 | | +| 2889 | [数据重塑:透视](/solution/2800-2899/2889.Reshape%20Data%20Pivot/README.md) | | 简单 | | | 2890 | [重塑数据:融合](/solution/2800-2899/2890.Reshape%20Data%20Melt/README.md) | | 简单 | | -| 2891 | [Method Chaining](/solution/2800-2899/2891.Method%20Chaining/README.md) | | 简单 | | +| 2891 | [方法链](/solution/2800-2899/2891.Method%20Chaining/README.md) | | 简单 | | | 2892 | [将相邻元素相乘后得到最小化数组](/solution/2800-2899/2892.Minimizing%20Array%20After%20Replacing%20Pairs%20With%20Their%20Product/README.md) | | 中等 | 🔒 | | 2893 | [Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) | | 中等 | 🔒 | | 2894 | [分类求和并作差](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README.md) | | 简单 | 第 366 场周赛 | diff --git a/solution/summary.md b/solution/summary.md index 8205b683e8454..2c9bb04e7288b 100644 --- a/solution/summary.md +++ b/solution/summary.md @@ -2933,9 +2933,9 @@ - [2875.无限数组的最短子数组](/solution/2800-2899/2875.Minimum%20Size%20Subarray%20in%20Infinite%20Array/README.md) - [2876.有向图访问计数](/solution/2800-2899/2876.Count%20Visited%20Nodes%20in%20a%20Directed%20Graph/README.md) - [2877.从表中创建 DataFrame](/solution/2800-2899/2877.Create%20a%20DataFrame%20from%20List/README.md) - - [2878.Get the Size of a DataFrame](/solution/2800-2899/2878.Get%20the%20Size%20of%20a%20DataFrame/README.md) - - [2879.Display the First Three Rows](/solution/2800-2899/2879.Display%20the%20First%20Three%20Rows/README.md) - - [2880.Select Data](/solution/2800-2899/2880.Select%20Data/README.md) + - [2878.获取 DataFrame 的大小](/solution/2800-2899/2878.Get%20the%20Size%20of%20a%20DataFrame/README.md) + - [2879.显示前三行](/solution/2800-2899/2879.Display%20the%20First%20Three%20Rows/README.md) + - [2880.数据选取](/solution/2800-2899/2880.Select%20Data/README.md) - [2881.创建新列](/solution/2800-2899/2881.Create%20a%20New%20Column/README.md) - [2882.删去重复的行](/solution/2800-2899/2882.Drop%20Duplicate%20Rows/README.md) - [2883.删去丢失的数据](/solution/2800-2899/2883.Drop%20Missing%20Data/README.md) @@ -2944,9 +2944,9 @@ - [2886.改变数据类型](/solution/2800-2899/2886.Change%20Data%20Type/README.md) - [2887.填充缺失值](/solution/2800-2899/2887.Fill%20Missing%20Data/README.md) - [2888.重塑数据:连结](/solution/2800-2899/2888.Reshape%20Data%20Concatenate/README.md) - - [2889.Reshape Data Pivot](/solution/2800-2899/2889.Reshape%20Data%20Pivot/README.md) + - [2889.数据重塑:透视](/solution/2800-2899/2889.Reshape%20Data%20Pivot/README.md) - [2890.重塑数据:融合](/solution/2800-2899/2890.Reshape%20Data%20Melt/README.md) - - [2891.Method Chaining](/solution/2800-2899/2891.Method%20Chaining/README.md) + - [2891.方法链](/solution/2800-2899/2891.Method%20Chaining/README.md) - [2892.将相邻元素相乘后得到最小化数组](/solution/2800-2899/2892.Minimizing%20Array%20After%20Replacing%20Pairs%20With%20Their%20Product/README.md) - [2893.Calculate Orders Within Each Interval](/solution/2800-2899/2893.Calculate%20Orders%20Within%20Each%20Interval/README.md) - [2894.分类求和并作差](/solution/2800-2899/2894.Divisible%20and%20Non-divisible%20Sums%20Difference/README.md) From 448487888baaa584f442085f10a6c51fef4137ff Mon Sep 17 00:00:00 2001 From: Yang Libin Date: Tue, 10 Oct 2023 00:23:48 +0000 Subject: [PATCH 2/2] docs: update summary --- solution/JAVASCRIPT_README.md | 8 ++++---- solution/JAVASCRIPT_README_EN.md | 4 ++-- solution/javascript-summary.md | 4 ++-- solution/main.py | 9 +++++++++ 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/solution/JAVASCRIPT_README.md b/solution/JAVASCRIPT_README.md index 9cc66a240364e..f8d07d4d6c519 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) | | 简单 | | @@ -34,9 +34,9 @@ | 2649 | [嵌套数组生成器](/solution/2600-2699/2649.Nested%20Array%20Generator/README.md) | | 中等 | | | 2650 | [设计可取消函数](/solution/2600-2699/2650.Design%20Cancellable%20Function/README.md) | | 困难 | | | 2665 | [计数器 II](/solution/2600-2699/2665.Counter%20II/README.md) | | 简单 | | -| 2666 | [只允许一次函数调用](/solution/2600-2699/2666.Allow%20One%20Function%20Call/README.md) | | 简单 | | +| 2666 | [只允许一次函数调用 44](/solution/2600-2699/2666.Allow%20One%20Function%20Call/README.md) | | 简单 | | | 2667 | [创建 Hello World 函数](/solution/2600-2699/2667.Create%20Hello%20World%20Function/README.md) | | 简单 | | -| 2675 | [将对象数组转换为矩阵](/solution/2600-2699/2675.Array%20of%20Objects%20to%20Matrix/README.md) | | 中等 | 🔒 | +| 2675 | [将对象数组转换为矩阵](/solution/2600-2699/2675.Array%20of%20Objects%20to%20Matrix/README.md) | | 困难 | 🔒 | | 2676 | [节流](/solution/2600-2699/2676.Throttle/README.md) | | 中等 | 🔒 | | 2677 | [分块数组](/solution/2600-2699/2677.Chunk%20Array/README.md) | | 简单 | | | 2690 | [无穷方法对象](/solution/2600-2699/2690.Infinite%20Method%20Object/README.md) | | 简单 | 🔒 | @@ -52,7 +52,7 @@ | 2715 | [执行可取消的延迟函数](/solution/2700-2799/2715.Timeout%20Cancellation/README.md) | | 简单 | | | 2721 | [并行执行异步函数](/solution/2700-2799/2721.Execute%20Asynchronous%20Functions%20in%20Parallel/README.md) | | 中等 | | | 2722 | [根据 ID 合并两个数组](/solution/2700-2799/2722.Join%20Two%20Arrays%20by%20ID/README.md) | | 中等 | | -| 2723 | [添加两个 Promise 对象](/solution/2700-2799/2723.Add%20Two%20Promises/README.md) | | 简单 | | +| 2723 | [两个 Promise 对象相加](/solution/2700-2799/2723.Add%20Two%20Promises/README.md) | | 简单 | | | 2724 | [排序方式](/solution/2700-2799/2724.Sort%20By/README.md) | | 简单 | | | 2725 | [间隔取消](/solution/2700-2799/2725.Interval%20Cancellation/README.md) | | 简单 | | | 2726 | [使用方法链的计算器](/solution/2700-2799/2726.Calculator%20with%20Method%20Chaining/README.md) | | 简单 | | diff --git a/solution/JAVASCRIPT_README_EN.md b/solution/JAVASCRIPT_README_EN.md index 9097f297157b7..f52785b99c9d9 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) | | Medium | 🔒 | +| 2632 | [Curry](/solution/2600-2699/2632.Curry/README_EN.md) | | Hard | 🔒 | | 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 | | @@ -34,7 +34,7 @@ Press Control + F(or Command + F on | 2665 | [Counter II](/solution/2600-2699/2665.Counter%20II/README_EN.md) | | Easy | | | 2666 | [Allow One Function Call](/solution/2600-2699/2666.Allow%20One%20Function%20Call/README_EN.md) | | Easy | | | 2667 | [Create Hello World Function](/solution/2600-2699/2667.Create%20Hello%20World%20Function/README_EN.md) | | Easy | | -| 2675 | [Array of Objects to Matrix](/solution/2600-2699/2675.Array%20of%20Objects%20to%20Matrix/README_EN.md) | | Medium | 🔒 | +| 2675 | [Array of Objects to Matrix](/solution/2600-2699/2675.Array%20of%20Objects%20to%20Matrix/README_EN.md) | | Hard | 🔒 | | 2676 | [Throttle](/solution/2600-2699/2676.Throttle/README_EN.md) | | Medium | 🔒 | | 2677 | [Chunk Array](/solution/2600-2699/2677.Chunk%20Array/README_EN.md) | | Easy | | | 2690 | [Infinite Method Object](/solution/2600-2699/2690.Infinite%20Method%20Object/README_EN.md) | | Easy | 🔒 | diff --git a/solution/javascript-summary.md b/solution/javascript-summary.md index 6a80917a7042a..55e6891c468f4 100644 --- a/solution/javascript-summary.md +++ b/solution/javascript-summary.md @@ -24,7 +24,7 @@ - [2649.嵌套数组生成器](/javascript-solution/2600-2699/2649.Nested%20Array%20Generator/README.md) - [2650.设计可取消函数](/javascript-solution/2600-2699/2650.Design%20Cancellable%20Function/README.md) - [2665.计数器 II](/javascript-solution/2600-2699/2665.Counter%20II/README.md) - - [2666.只允许一次函数调用](/javascript-solution/2600-2699/2666.Allow%20One%20Function%20Call/README.md) + - [2666.只允许一次函数调用 44](/javascript-solution/2600-2699/2666.Allow%20One%20Function%20Call/README.md) - [2667.创建 Hello World 函数](/javascript-solution/2600-2699/2667.Create%20Hello%20World%20Function/README.md) - [2675.将对象数组转换为矩阵](/javascript-solution/2600-2699/2675.Array%20of%20Objects%20to%20Matrix/README.md) - [2676.节流](/javascript-solution/2600-2699/2676.Throttle/README.md) @@ -42,7 +42,7 @@ - [2715.执行可取消的延迟函数](/javascript-solution/2700-2799/2715.Timeout%20Cancellation/README.md) - [2721.并行执行异步函数](/javascript-solution/2700-2799/2721.Execute%20Asynchronous%20Functions%20in%20Parallel/README.md) - [2722.根据 ID 合并两个数组](/javascript-solution/2700-2799/2722.Join%20Two%20Arrays%20by%20ID/README.md) - - [2723.添加两个 Promise 对象](/javascript-solution/2700-2799/2723.Add%20Two%20Promises/README.md) + - [2723.两个 Promise 对象相加](/javascript-solution/2700-2799/2723.Add%20Two%20Promises/README.md) - [2724.排序方式](/javascript-solution/2700-2799/2724.Sort%20By/README.md) - [2725.间隔取消](/javascript-solution/2700-2799/2725.Interval%20Cancellation/README.md) - [2726.使用方法链的计算器](/javascript-solution/2700-2799/2726.Calculator%20with%20Method%20Chaining/README.md) diff --git a/solution/main.py b/solution/main.py index f2f8745ee1b91..2bd612ecb78f6 100644 --- a/solution/main.py +++ b/solution/main.py @@ -413,10 +413,19 @@ def run(): # 生成周赛题目列表 generate_contest_readme(cls) + # 生成分类题目列表 + generate_category_readme(ls, "Database") + generate_category_readme(ls, "JavaScript") + generate_category_summary(ls, "Database") + generate_category_summary(ls, "JavaScript") + # 刷新题目文件 if refresh_all: refresh(ls) + # 格式化 + os.system('cd .. && npx prettier --write "**/*.{md,js,ts,php,sql}"') + if __name__ == "__main__": run()