mirror of https://github.com/doocs/leetcode.git
feat: add new lc problems (#4379)
This commit is contained in:
parent
43b825f985
commit
7fb7d02919
|
|
@ -17,7 +17,9 @@ tags:
|
|||
|
||||
<!-- description:start -->
|
||||
|
||||
<p>给你两个字符串 <code>s</code><strong> </strong>和 <code>t</code> ,统计并返回在 <code>s</code> 的 <strong>子序列</strong> 中 <code>t</code> 出现的个数,结果需要对 10<sup>9</sup> + 7 取模。</p>
|
||||
<p>给你两个字符串 <code>s</code><strong> </strong>和 <code>t</code> ,统计并返回在 <code>s</code> 的 <strong>子序列</strong> 中 <code>t</code> 出现的个数。</p>
|
||||
|
||||
<p>测试用例保证结果在 32 位有符号整数范围内。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ tags:
|
|||
| id | int |
|
||||
| salary | int |
|
||||
+-------------+------+
|
||||
在 SQL 中,id 是该表的主键。
|
||||
id 是该表的主键(列中的值互不相同)。
|
||||
该表的每一行都包含有关员工工资的信息。
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>查询 <code>Employee</code> 表中第 <code>n</code> 高的工资。如果没有第 <code>n</code> 个最高工资,查询结果应该为 <code>null</code> 。</p>
|
||||
<p>编写一个解决方案查询 <code>Employee</code> 表中第 <code>n</code> 高的 <strong>不同</strong> 工资。如果少于 <code>n</code> 个不同工资,查询结果应该为 <code>null</code> 。</p>
|
||||
|
||||
<p>查询结果格式如下所示。</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Each row of this table contains information about the salary of an employee.
|
|||
|
||||
<p> </p>
|
||||
|
||||
<p>Write a solution to find the <code>n<sup>th</sup></code> highest salary from the <code>Employee</code> table. If there is no <code>n<sup>th</sup></code> highest salary, return <code>null</code>.</p>
|
||||
<p>Write a solution to find the <code>n<sup>th</sup></code> highest <strong>distinct</strong> salary from the <code>Employee</code> table. If there are less than <code>n</code> distinct salaries, return <code>null</code>.</p>
|
||||
|
||||
<p>The result format is in the following example.</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ tags:
|
|||
|
||||
<!-- description:start -->
|
||||
|
||||
<p>给你一个整数数组 <code>citations</code> ,其中 <code>citations[i]</code> 表示研究者的第 <code>i</code> 篇论文被引用的次数,<code>citations</code> 已经按照 <strong>升序排列 </strong>。计算并返回该研究者的 h<strong><em> </em></strong>指数。</p>
|
||||
<p>给你一个整数数组 <code>citations</code> ,其中 <code>citations[i]</code> 表示研究者的第 <code>i</code> 篇论文被引用的次数,<code>citations</code> 已经按照 <strong>非降序排列 </strong>。计算并返回该研究者的 h<strong><em> </em></strong>指数。</p>
|
||||
|
||||
<p><a href="https://baike.baidu.com/item/h-index/3991452?fr=aladdin" target="_blank">h 指数的定义</a>:h 代表“高引用次数”(high citations),一名科研人员的 <code>h</code> 指数是指他(她)的 (<code>n</code> 篇论文中)<strong>至少 </strong>有 <code>h</code> 篇论文分别被引用了<strong>至少</strong> <code>h</code> 次。</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ tags:
|
|||
|
||||
<!-- description:start -->
|
||||
|
||||
<p>Given an array of integers <code>citations</code> where <code>citations[i]</code> is the number of citations a researcher received for their <code>i<sup>th</sup></code> paper and <code>citations</code> is sorted in <strong>ascending order</strong>, return <em>the researcher's h-index</em>.</p>
|
||||
<p>Given an array of integers <code>citations</code> where <code>citations[i]</code> is the number of citations a researcher received for their <code>i<sup>th</sup></code> paper and <code>citations</code> is sorted in <strong>non-descending order</strong>, return <em>the researcher's h-index</em>.</p>
|
||||
|
||||
<p>According to the <a href="https://en.wikipedia.org/wiki/H-index" target="_blank">definition of h-index on Wikipedia</a>: The h-index is defined as the maximum value of <code>h</code> such that the given researcher has published at least <code>h</code> papers that have each been cited at least <code>h</code> times.</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ tags:
|
|||
|
||||
<p><strong>总旅行距离 </strong>是朋友们家到聚会地点的距离之和。</p>
|
||||
|
||||
<p>使用 <strong>曼哈顿距离</strong> 计算距离,其中距离 <code>(p1, p2) = |p2.x - p1.x | + | p2.y - p1.y |</code> 。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ tags:
|
|||
|
||||
<p>The <strong>total travel distance</strong> is the sum of the distances between the houses of the friends and the meeting point.</p>
|
||||
|
||||
<p>The distance is calculated using <a href="http://en.wikipedia.org/wiki/Taxicab_geometry" target="_blank">Manhattan Distance</a>, where <code>distance(p1, p2) = |p2.x - p1.x| + |p2.y - p1.y|</code>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0300-0399/0317.Shortest%20Distance%20from%20All%20Buildings/images/buildings-grid.jpg" style="width: 413px; height: 253px;" />
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/0600-0699/0689.Ma
|
|||
tags:
|
||||
- 数组
|
||||
- 动态规划
|
||||
- 前缀和
|
||||
- 滑动窗口
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/0600-0699/0689.Ma
|
|||
tags:
|
||||
- Array
|
||||
- Dynamic Programming
|
||||
- Prefix Sum
|
||||
- Sliding Window
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/0700-0799/0759.Em
|
|||
tags:
|
||||
- 数组
|
||||
- 排序
|
||||
- 扫描线
|
||||
- 堆(优先队列)
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/0700-0799/0759.Em
|
|||
tags:
|
||||
- Array
|
||||
- Sorting
|
||||
- Line Sweep
|
||||
- Heap (Priority Queue)
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ tags:
|
|||
<strong>输入:</strong>answers = [1,1,2]
|
||||
<strong>输出:</strong>5
|
||||
<strong>解释:</strong>
|
||||
两只回答了 "1" 的兔子可能有相同的颜色,设为红色。
|
||||
两只回答了 "1" 的兔子可能有相同的颜色,设为红色。
|
||||
之后回答了 "2" 的兔子不会是红色,否则他们的回答会相互矛盾。
|
||||
设回答了 "2" 的兔子为蓝色。
|
||||
此外,森林中还应有另外 2 只蓝色兔子的回答没有包含在数组中。
|
||||
设回答了 "2" 的兔子为蓝色。
|
||||
此外,森林中还应有另外 2 只蓝色兔子的回答没有包含在数组中。
|
||||
因此森林中兔子的最少数量是 5 只:3 只回答的和 2 只没有回答的。
|
||||
</pre>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ tags:
|
|||
|
||||
<p>有一个有 <code>n</code> 个节点的有向图,节点按 <code>0</code> 到 <code>n - 1</code> 编号。图由一个 <strong>索引从 0 开始</strong> 的 2D 整数数组 <code>graph</code>表示, <code>graph[i]</code>是与节点 <code>i</code> 相邻的节点的整数数组,这意味着从节点 <code>i</code> 到 <code>graph[i]</code>中的每个节点都有一条边。</p>
|
||||
|
||||
<p>如果一个节点没有连出的有向边,则该节点是 <strong>终端节点</strong> 。如果从该节点开始的所有可能路径都通向 <strong>终端节点</strong> ,则该节点为 <strong>安全节点</strong> 。</p>
|
||||
<p>如果一个节点没有连出的有向边,则该节点是 <strong>终端节点</strong> 。如果从该节点开始的所有可能路径都通向 <strong>终端节点</strong> ,则该节点为 <strong>终端节点</strong>(或另一个安全节点)。</p>
|
||||
|
||||
<p>返回一个由图中所有 <strong>安全节点</strong> 组成的数组作为答案。答案数组中的元素应当按 <strong>升序</strong> 排列。</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/0900-0999/0949.La
|
|||
tags:
|
||||
- 数组
|
||||
- 字符串
|
||||
- 回溯
|
||||
- 枚举
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/0900-0999/0949.La
|
|||
tags:
|
||||
- Array
|
||||
- String
|
||||
- Backtracking
|
||||
- Enumeration
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ source: 第 135 场周赛 Q4
|
|||
tags:
|
||||
- 数组
|
||||
- 数学
|
||||
- 双指针
|
||||
- 排序
|
||||
- 滑动窗口
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ source: Weekly Contest 135 Q4
|
|||
tags:
|
||||
- Array
|
||||
- Math
|
||||
- Two Pointers
|
||||
- Sorting
|
||||
- Sliding Window
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Each row of this table shows a sale on the product product_id in a certain year.
|
|||
Note that the price is per unit.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
<p>Table: <code>Product</code></p>
|
||||
|
||||
|
|
@ -49,13 +49,13 @@ product_id is the primary key (column with unique values) of this table.
|
|||
Each row of this table indicates the product name of each product.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
<p>Write a solution to select the <strong>product id</strong>, <strong>year</strong>, <strong>quantity</strong>, and <strong>price</strong> for the <strong>first year</strong> of every product sold.</p>
|
||||
<p>Write a solution to select the <strong>product id</strong>, <strong>year</strong>, <strong>quantity</strong>, and <strong>price</strong> for the <strong>first year</strong> of every product sold. If any product is bought multiple times in its first year, return all sales separately.</p>
|
||||
|
||||
<p>Return the resulting table in <strong>any order</strong>.</p>
|
||||
|
||||
<p>The result format is in the following example.</p>
|
||||
<p>The result format is in the following example.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ tags:
|
|||
|
||||
<p> </p>
|
||||
|
||||
<p>请查询出所有浏览过自己文章的作者</p>
|
||||
<p>请查询出所有浏览过自己文章的作者。</p>
|
||||
|
||||
<p>结果按照 <code>id</code> 升序排列。</p>
|
||||
<p>结果按照作者的 <code>id</code> 升序排列。</p>
|
||||
|
||||
<p>查询结果的格式如下所示:</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ tags:
|
|||
|
||||
<!-- description:start -->
|
||||
|
||||
<p>给你一个整数数组 <code>nums</code>,请你返回其中位数为 <strong>偶数</strong> 的数字的个数。</p>
|
||||
<p>给你一个整数数组 <code>nums</code>,请你返回其中包含 <strong>偶数</strong> 个数位的数字的个数。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,15 +19,18 @@ tags:
|
|||
|
||||
<!-- description:start -->
|
||||
|
||||
<p>给你一个整数 <code>n</code> 。请你先求出从 <code>1</code> 到 <code>n</code> 的每个整数 10 进制表示下的数位和(每一位上的数字相加),然后把数位和相等的数字放到同一个组中。</p>
|
||||
<p>给定一个整数 <code>n</code> 。</p>
|
||||
|
||||
<p>请你统计每个组中的数字数目,并返回数字数目并列最多的组有多少个。</p>
|
||||
<p>我们需要根据数字的数位和将 <code>1</code> 到 <code>n</code> 的数字分组。例如,数字 14 和 5 属于 <strong>同一</strong> 组,而数字 13 和 3 属于 <strong>不同</strong> 组。</p>
|
||||
|
||||
<p>返回最大组的数字数量,即元素数量 <strong>最多</strong> 的组。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>n = 13
|
||||
<pre>
|
||||
<strong>输入:</strong>n = 13
|
||||
<strong>输出:</strong>4
|
||||
<strong>解释:</strong>总共有 9 个组,将 1 到 13 按数位求和后这些组分别是:
|
||||
[1,10],[2,11],[3,12],[4,13],[5],[6],[7],[8],[9]。总共有 4 个组拥有的数字并列最多。
|
||||
|
|
@ -35,29 +38,18 @@ tags:
|
|||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>n = 2
|
||||
<pre>
|
||||
<strong>输入:</strong>n = 2
|
||||
<strong>输出:</strong>2
|
||||
<strong>解释:</strong>总共有 2 个大小为 1 的组 [1],[2]。
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>n = 15
|
||||
<strong>输出:</strong>6
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 4:</strong></p>
|
||||
|
||||
<pre><strong>输入:</strong>n = 24
|
||||
<strong>输出:</strong>5
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= n <= 10^4</code></li>
|
||||
<li><code>1 <= n <= 10<sup>4</sup></code></li>
|
||||
</ul>
|
||||
|
||||
<!-- description:end -->
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ tags:
|
|||
|
||||
<p>You are given an integer <code>n</code>.</p>
|
||||
|
||||
<p>Each number from <code>1</code> to <code>n</code> is grouped according to the sum of its digits.</p>
|
||||
<p>We need to group the numbers from <code>1</code> to <code>n</code> according to the sum of its digits. For example, the numbers 14 and 5 belong to the <strong>same</strong> group, whereas 13 and 3 belong to <strong>different</strong> groups.</p>
|
||||
|
||||
<p>Return <em>the number of groups that have the largest size</em>.</p>
|
||||
<p>Return the number of groups that have the largest size, i.e. the <strong>maximum</strong> number of elements.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ source: 第 183 场周赛 Q2
|
|||
tags:
|
||||
- 位运算
|
||||
- 字符串
|
||||
- 模拟
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ source: Weekly Contest 183 Q2
|
|||
tags:
|
||||
- Bit Manipulation
|
||||
- String
|
||||
- Simulation
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ tags:
|
|||
- 数组
|
||||
- 双指针
|
||||
- 二分查找
|
||||
- 前缀和
|
||||
- 排序
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ tags:
|
|||
- Array
|
||||
- Two Pointers
|
||||
- Binary Search
|
||||
- Prefix Sum
|
||||
- Sorting
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/1700-1799/1778.Sh
|
|||
tags:
|
||||
- 深度优先搜索
|
||||
- 广度优先搜索
|
||||
- 图
|
||||
- 数组
|
||||
- 交互
|
||||
- 矩阵
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/1700-1799/1778.Sh
|
|||
tags:
|
||||
- Depth-First Search
|
||||
- Breadth-First Search
|
||||
- Graph
|
||||
- Array
|
||||
- Interactive
|
||||
- Matrix
|
||||
---
|
||||
|
||||
<!-- problem:start -->
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ tags:
|
|||
- 深度优先搜索
|
||||
- 广度优先搜索
|
||||
- 图
|
||||
- 数组
|
||||
- 交互
|
||||
- 矩阵
|
||||
- 最短路
|
||||
- 堆(优先队列)
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ tags:
|
|||
- Depth-First Search
|
||||
- Breadth-First Search
|
||||
- Graph
|
||||
- Array
|
||||
- Interactive
|
||||
- Matrix
|
||||
- Shortest Path
|
||||
- Heap (Priority Queue)
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ tags:
|
|||
<strong>Output:</strong> [[1,3],[4,6]]
|
||||
<strong>Explanation:
|
||||
</strong>For nums1, nums1[1] = 2 is present at index 0 of nums2, whereas nums1[0] = 1 and nums1[2] = 3 are not present in nums2. Therefore, answer[0] = [1,3].
|
||||
For nums2, nums2[0] = 2 is present at index 1 of nums1, whereas nums2[1] = 4 and nums2[2] = 6 are not present in nums2. Therefore, answer[1] = [4,6].</pre>
|
||||
For nums2, nums2[0] = 2 is present at index 1 of nums1, whereas nums2[1] = 4 and nums2[2] = 6 are not present in nums1. Therefore, answer[1] = [4,6].</pre>
|
||||
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ tags:
|
|||
<strong>输出:</strong>11
|
||||
<strong>解释:</strong>存在以下理想数组:
|
||||
- 以 1 开头的数组(9 个):
|
||||
- 不含其他不同值(1 个):[1,1,1,1,1]
|
||||
- 不含其他不同值(1 个):[1,1,1,1,1]
|
||||
- 含一个不同值 2(4 个):[1,1,1,1,2], [1,1,1,2,2], [1,1,2,2,2], [1,2,2,2,2]
|
||||
- 含一个不同值 3(4 个):[1,1,1,1,3], [1,1,1,3,3], [1,1,3,3,3], [1,3,3,3,3]
|
||||
- 以 2 开头的数组(1 个):[2,2,2,2,2]
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ There are a total of 5 + 2 + 1 + 1 + 1 = 10 distinct ideal arrays.
|
|||
<strong>Input:</strong> n = 5, maxValue = 3
|
||||
<strong>Output:</strong> 11
|
||||
<strong>Explanation:</strong> The following are the possible ideal arrays:
|
||||
- Arrays starting with the value 1 (9 arrays):
|
||||
- With no other distinct values (1 array): [1,1,1,1,1]
|
||||
- Arrays starting with the value 1 (9 arrays):
|
||||
- With no other distinct values (1 array): [1,1,1,1,1]
|
||||
- With 2<sup>nd</sup> distinct value 2 (4 arrays): [1,1,1,1,2], [1,1,1,2,2], [1,1,2,2,2], [1,2,2,2,2]
|
||||
- With 2<sup>nd</sup> distinct value 3 (4 arrays): [1,1,1,1,3], [1,1,1,3,3], [1,1,3,3,3], [1,3,3,3,3]
|
||||
- Arrays starting with the value 2 (1 array): [2,2,2,2,2]
|
||||
|
|
@ -92,8 +92,8 @@ $$
|
|||
|
||||
where $k$ represents the maximum value of the array, i.e., $\textit{maxValue}$.
|
||||
|
||||
- **Time Complexity**: $O(m \times \log^2 m)$
|
||||
- **Space Complexity**: $O(m \times \log m)$
|
||||
- **Time Complexity**: $O(m \times \log^2 m)$
|
||||
- **Space Complexity**: $O(m \times \log m)$
|
||||
|
||||
<!-- tabs:start -->
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ tags:
|
|||
|
||||
<p>请你编写一个异步函数,它接收一个正整数参数 <code>millis</code> ,并休眠 <code>millis</code> 毫秒。要求此函数可以解析任何值。</p>
|
||||
|
||||
<p><strong>请注意</strong>,实际睡眠持续时间与 <code>millis</code> 之间的微小偏差是可以接受的。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><b>示例 1:</b></p>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ tags:
|
|||
|
||||
<p>Given a positive integer <code>millis</code>, write an asynchronous function that sleeps for <code>millis</code> milliseconds. It can resolve any value.</p>
|
||||
|
||||
<p><strong>Note</strong> that <em>minor</em> deviation from <code>millis</code> in the actual sleep duration is acceptable.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ tags:
|
|||
|
||||
<!-- description:start -->
|
||||
|
||||
<p>给你一个整数数组 <code>nums</code> ,请你返回长度为 3 的 <span data-keyword="subarray-nonempty">子数组</span>,满足第一个数和第三个数的和恰好为第二个数的一半。</p>
|
||||
<p>给你一个整数数组 <code>nums</code> ,请你返回长度为 3 的 <span data-keyword="subarray-nonempty">子数组</span> 的数量,满足第一个数和第三个数的和恰好为第二个数的一半。</p>
|
||||
|
||||
<p><strong>子数组</strong> 指的是一个数组中连续 <strong>非空</strong> 的元素序列。</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ tags:
|
|||
|
||||
<!-- description:start -->
|
||||
|
||||
<p>给定一个整数数组 <code>nums</code> 和一个整数 <code>k</code>,如果元素 <code>nums[i]</code> <strong>严格</strong> 大于下标 <code>i - k</code> 和 <code>i + k</code> 处的元素(如果这些元素存在),则该元素 <code>nums[i]</code> 被认为是 <strong>好</strong> 的。如果这两个下标都不存在,那么 <code>nums[i]</code> 仍然被认为是 <strong>好</strong> 的。</p>
|
||||
<p>给定一个整数数组 <code>nums</code> 和一个整数 <code>k</code>,如果元素 <code>nums[i]</code> <strong>严格</strong> 大于下标 <code>i - k</code> 和 <code>i + k</code> 处的元素(如果这些元素存在),则该元素 <code>nums[i]</code> 被认为是 <strong>好</strong> 的。如果这两个下标至少一个不存在,那么 <code>nums[i]</code> 仍然被认为是 <strong>好</strong> 的。</p>
|
||||
|
||||
<p>返回数组中所有 <strong>好</strong> 元素的 <strong>和</strong>。</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 简单
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3477.Fruits%20Into%20Baskets%20II/README.md
|
||||
rating: 1295
|
||||
source: 第 440 场周赛 Q1
|
||||
tags:
|
||||
- 线段树
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Easy
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3477.Fruits%20Into%20Baskets%20II/README_EN.md
|
||||
rating: 1295
|
||||
source: Weekly Contest 440 Q1
|
||||
tags:
|
||||
- Segment Tree
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3478.Choose%20K%20Elements%20With%20Maximum%20Sum/README.md
|
||||
rating: 1753
|
||||
source: 第 440 场周赛 Q2
|
||||
tags:
|
||||
- 数组
|
||||
- 排序
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3478.Choose%20K%20Elements%20With%20Maximum%20Sum/README_EN.md
|
||||
rating: 1753
|
||||
source: Weekly Contest 440 Q2
|
||||
tags:
|
||||
- Array
|
||||
- Sorting
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3479.Fruits%20Into%20Baskets%20III/README.md
|
||||
rating: 2178
|
||||
source: 第 440 场周赛 Q3
|
||||
tags:
|
||||
- 线段树
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3479.Fruits%20Into%20Baskets%20III/README_EN.md
|
||||
rating: 2178
|
||||
source: Weekly Contest 440 Q3
|
||||
tags:
|
||||
- Segment Tree
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3480.Maximize%20Subarrays%20After%20Removing%20One%20Conflicting%20Pair/README.md
|
||||
rating: 2763
|
||||
source: 第 440 场周赛 Q4
|
||||
tags:
|
||||
- 线段树
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3480.Maximize%20Subarrays%20After%20Removing%20One%20Conflicting%20Pair/README_EN.md
|
||||
rating: 2763
|
||||
source: Weekly Contest 440 Q4
|
||||
tags:
|
||||
- Segment Tree
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 简单
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3483.Unique%203-Digit%20Even%20Numbers/README.md
|
||||
rating: 1323
|
||||
source: 第 152 场双周赛 Q1
|
||||
tags:
|
||||
- 递归
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Easy
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3483.Unique%203-Digit%20Even%20Numbers/README_EN.md
|
||||
rating: 1323
|
||||
source: Biweekly Contest 152 Q1
|
||||
tags:
|
||||
- Recursion
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3484.Design%20Spreadsheet/README.md
|
||||
rating: 1523
|
||||
source: 第 152 场双周赛 Q2
|
||||
tags:
|
||||
- 设计
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3484.Design%20Spreadsheet/README_EN.md
|
||||
rating: 1523
|
||||
source: Biweekly Contest 152 Q2
|
||||
tags:
|
||||
- Design
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3485.Longest%20Common%20Prefix%20of%20K%20Strings%20After%20Removal/README.md
|
||||
rating: 2289
|
||||
source: 第 152 场双周赛 Q3
|
||||
tags:
|
||||
- 字典树
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3485.Longest%20Common%20Prefix%20of%20K%20Strings%20After%20Removal/README_EN.md
|
||||
rating: 2289
|
||||
source: Biweekly Contest 152 Q3
|
||||
tags:
|
||||
- Trie
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3486.Longest%20Special%20Path%20II/README.md
|
||||
rating: 2924
|
||||
source: 第 152 场双周赛 Q4
|
||||
tags:
|
||||
- 树
|
||||
- 深度优先搜索
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3486.Longest%20Special%20Path%20II/README_EN.md
|
||||
rating: 2924
|
||||
source: Biweekly Contest 152 Q4
|
||||
tags:
|
||||
- Tree
|
||||
- Depth-First Search
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 简单
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3487.Maximum%20Unique%20Subarray%20Sum%20After%20Deletion/README.md
|
||||
rating: 1399
|
||||
source: 第 441 场周赛 Q1
|
||||
tags:
|
||||
- 贪心
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Easy
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3487.Maximum%20Unique%20Subarray%20Sum%20After%20Deletion/README_EN.md
|
||||
rating: 1399
|
||||
source: Weekly Contest 441 Q1
|
||||
tags:
|
||||
- Greedy
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3488.Closest%20Equal%20Element%20Queries/README.md
|
||||
rating: 1699
|
||||
source: 第 441 场周赛 Q2
|
||||
tags:
|
||||
- 数组
|
||||
- 哈希表
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3488.Closest%20Equal%20Element%20Queries/README_EN.md
|
||||
rating: 1699
|
||||
source: Weekly Contest 441 Q2
|
||||
tags:
|
||||
- Array
|
||||
- Hash Table
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3489.Zero%20Array%20Transformation%20IV/README.md
|
||||
rating: 2068
|
||||
source: 第 441 场周赛 Q3
|
||||
tags:
|
||||
- 数组
|
||||
- 动态规划
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3489.Zero%20Array%20Transformation%20IV/README_EN.md
|
||||
rating: 2068
|
||||
source: Weekly Contest 441 Q3
|
||||
tags:
|
||||
- Array
|
||||
- Dynamic Programming
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3490.Count%20Beautiful%20Numbers/README.md
|
||||
rating: 2502
|
||||
source: 第 441 场周赛 Q4
|
||||
tags:
|
||||
- 动态规划
|
||||
---
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3490.Count%20Beautiful%20Numbers/README_EN.md
|
||||
rating: 2502
|
||||
source: Weekly Contest 441 Q4
|
||||
tags:
|
||||
- Dynamic Programming
|
||||
---
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 简单
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3492.Maximum%20Containers%20on%20a%20Ship/README.md
|
||||
rating: 1140
|
||||
source: 第 442 场周赛 Q1
|
||||
tags:
|
||||
- 数学
|
||||
---
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Easy
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3492.Maximum%20Containers%20on%20a%20Ship/README_EN.md
|
||||
rating: 1140
|
||||
source: Weekly Contest 442 Q1
|
||||
tags:
|
||||
- Math
|
||||
---
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3493.Properties%20Graph/README.md
|
||||
rating: 1565
|
||||
source: 第 442 场周赛 Q2
|
||||
tags:
|
||||
- 深度优先搜索
|
||||
- 广度优先搜索
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3493.Properties%20Graph/README_EN.md
|
||||
rating: 1565
|
||||
source: Weekly Contest 442 Q2
|
||||
tags:
|
||||
- Depth-First Search
|
||||
- Breadth-First Search
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3494.Find%20the%20Minimum%20Amount%20of%20Time%20to%20Brew%20Potions/README.md
|
||||
rating: 2042
|
||||
source: 第 442 场周赛 Q3
|
||||
tags:
|
||||
- 数组
|
||||
- 前缀和
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3494.Find%20the%20Minimum%20Amount%20of%20Time%20to%20Brew%20Potions/README_EN.md
|
||||
rating: 2042
|
||||
source: Weekly Contest 442 Q3
|
||||
tags:
|
||||
- Array
|
||||
- Prefix Sum
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3495.Minimum%20Operations%20to%20Make%20Array%20Elements%20Zero/README.md
|
||||
rating: 2205
|
||||
source: 第 442 场周赛 Q4
|
||||
tags:
|
||||
- 位运算
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3495.Minimum%20Operations%20to%20Make%20Array%20Elements%20Zero/README_EN.md
|
||||
rating: 2205
|
||||
source: Weekly Contest 442 Q4
|
||||
tags:
|
||||
- Bit Manipulation
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ activity_duration 是用户当天在平台上花费的分钟数。
|
|||
<li>体验了 3 天免费试用,时长分别为 45,30 和 60 分钟。</li>
|
||||
<li>平均试用时长:(45 + 30 + 60) / 3 = 45.00 分钟。</li>
|
||||
<li>拥有 3 天付费订阅,时长分别为 75,90 和 65分钟。</li>
|
||||
<li>平均花费市场:(75 + 90 + 65) / 3 = 76.67 分钟。</li>
|
||||
<li>平均花费时长:(75 + 90 + 65) / 3 = 76.67 分钟。</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>用户 2:</strong>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 简单
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3498.Reverse%20Degree%20of%20a%20String/README.md
|
||||
rating: 1201
|
||||
source: 第 153 场双周赛 Q1
|
||||
tags:
|
||||
- 字符串
|
||||
- 模拟
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Easy
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3498.Reverse%20Degree%20of%20a%20String/README_EN.md
|
||||
rating: 1201
|
||||
source: Biweekly Contest 153 Q1
|
||||
tags:
|
||||
- String
|
||||
- Simulation
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3499.Maximize%20Active%20Section%20with%20Trade%20I/README.md
|
||||
rating: 1729
|
||||
source: 第 153 场双周赛 Q2
|
||||
tags:
|
||||
- 字符串
|
||||
- 枚举
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3499.Maximize%20Active%20Section%20with%20Trade%20I/README_EN.md
|
||||
rating: 1729
|
||||
source: Biweekly Contest 153 Q2
|
||||
tags:
|
||||
- String
|
||||
- Enumeration
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3500.Minimum%20Cost%20to%20Divide%20Array%20Into%20Subarrays/README.md
|
||||
rating: 2569
|
||||
source: 第 153 场双周赛 Q3
|
||||
tags:
|
||||
- 数组
|
||||
- 动态规划
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3500.Minimum%20Cost%20to%20Divide%20Array%20Into%20Subarrays/README_EN.md
|
||||
rating: 2569
|
||||
source: Biweekly Contest 153 Q3
|
||||
tags:
|
||||
- Array
|
||||
- Dynamic Programming
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3501.Maximize%20Active%20Section%20with%20Trade%20II/README.md
|
||||
rating: 2940
|
||||
source: 第 153 场双周赛 Q4
|
||||
tags:
|
||||
- 线段树
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3501.Maximize%20Active%20Section%20with%20Trade%20II/README_EN.md
|
||||
rating: 2940
|
||||
source: Biweekly Contest 153 Q4
|
||||
tags:
|
||||
- Segment Tree
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 简单
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3502.Minimum%20Cost%20to%20Reach%20Every%20Position/README.md
|
||||
rating: 1243
|
||||
source: 第 443 场周赛 Q1
|
||||
tags:
|
||||
- 数组
|
||||
---
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Easy
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3502.Minimum%20Cost%20to%20Reach%20Every%20Position/README_EN.md
|
||||
rating: 1243
|
||||
source: Weekly Contest 443 Q1
|
||||
tags:
|
||||
- Array
|
||||
---
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3503.Longest%20Palindrome%20After%20Substring%20Concatenation%20I/README.md
|
||||
rating: 1548
|
||||
source: 第 443 场周赛 Q2
|
||||
tags:
|
||||
- 双指针
|
||||
- 字符串
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3503.Longest%20Palindrome%20After%20Substring%20Concatenation%20I/README_EN.md
|
||||
rating: 1548
|
||||
source: Weekly Contest 443 Q2
|
||||
tags:
|
||||
- Two Pointers
|
||||
- String
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3504.Longest%20Palindrome%20After%20Substring%20Concatenation%20II/README.md
|
||||
rating: 2397
|
||||
source: 第 443 场周赛 Q3
|
||||
tags:
|
||||
- 双指针
|
||||
- 字符串
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3504.Longest%20Palindrome%20After%20Substring%20Concatenation%20II/README_EN.md
|
||||
rating: 2397
|
||||
source: Weekly Contest 443 Q3
|
||||
tags:
|
||||
- Two Pointers
|
||||
- String
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3505.Minimum%20Operations%20to%20Make%20Elements%20Within%20K%20Subarrays%20Equal/README.md
|
||||
rating: 2538
|
||||
source: 第 443 场周赛 Q4
|
||||
tags:
|
||||
- 数组
|
||||
- 哈希表
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3505.Minimum%20Operations%20to%20Make%20Elements%20Within%20K%20Subarrays%20Equal/README_EN.md
|
||||
rating: 2538
|
||||
source: Weekly Contest 443 Q4
|
||||
tags:
|
||||
- Array
|
||||
- Hash Table
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 简单
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3507.Minimum%20Pair%20Removal%20to%20Sort%20Array%20I/README.md
|
||||
rating: 1348
|
||||
source: 第 444 场周赛 Q1
|
||||
tags:
|
||||
- 数组
|
||||
- 哈希表
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Easy
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3507.Minimum%20Pair%20Removal%20to%20Sort%20Array%20I/README_EN.md
|
||||
rating: 1348
|
||||
source: Weekly Contest 444 Q1
|
||||
tags:
|
||||
- Array
|
||||
- Hash Table
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3508.Implement%20Router/README.md
|
||||
rating: 1851
|
||||
source: 第 444 场周赛 Q2
|
||||
tags:
|
||||
- 设计
|
||||
- 队列
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3508.Implement%20Router/README_EN.md
|
||||
rating: 1851
|
||||
source: Weekly Contest 444 Q2
|
||||
tags:
|
||||
- Design
|
||||
- Queue
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3509.Maximum%20Product%20of%20Subsequences%20With%20an%20Alternating%20Sum%20Equal%20to%20K/README.md
|
||||
rating: 2702
|
||||
source: 第 444 场周赛 Q3
|
||||
tags:
|
||||
- 数组
|
||||
- 哈希表
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3509.Maximum%20Product%20of%20Subsequences%20With%20an%20Alternating%20Sum%20Equal%20to%20K/README_EN.md
|
||||
rating: 2702
|
||||
source: Weekly Contest 444 Q3
|
||||
tags:
|
||||
- Array
|
||||
- Hash Table
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 困难
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3510.Minimum%20Pair%20Removal%20to%20Sort%20Array%20II/README.md
|
||||
rating: 2608
|
||||
source: 第 444 场周赛 Q4
|
||||
tags:
|
||||
- 数组
|
||||
- 哈希表
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Hard
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3510.Minimum%20Pair%20Removal%20to%20Sort%20Array%20II/README_EN.md
|
||||
rating: 2608
|
||||
source: Weekly Contest 444 Q4
|
||||
tags:
|
||||
- Array
|
||||
- Hash Table
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 简单
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3512.Minimum%20Operations%20to%20Make%20Array%20Sum%20Divisible%20by%20K/README.md
|
||||
rating: 1228
|
||||
source: 第 154 场双周赛 Q1
|
||||
tags:
|
||||
- 数组
|
||||
- 数学
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Easy
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3512.Minimum%20Operations%20to%20Make%20Array%20Sum%20Divisible%20by%20K/README_EN.md
|
||||
rating: 1228
|
||||
source: Biweekly Contest 154 Q1
|
||||
tags:
|
||||
- Array
|
||||
- Math
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3513.Number%20of%20Unique%20XOR%20Triplets%20I/README.md
|
||||
rating: 1663
|
||||
source: 第 154 场双周赛 Q2
|
||||
tags:
|
||||
- 位运算
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3513.Number%20of%20Unique%20XOR%20Triplets%20I/README_EN.md
|
||||
rating: 1663
|
||||
source: Biweekly Contest 154 Q2
|
||||
tags:
|
||||
- Bit Manipulation
|
||||
- Array
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: 中等
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3514.Number%20of%20Unique%20XOR%20Triplets%20II/README.md
|
||||
rating: 1883
|
||||
source: 第 154 场双周赛 Q3
|
||||
tags:
|
||||
- 位运算
|
||||
- 数组
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
comments: true
|
||||
difficulty: Medium
|
||||
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3514.Number%20of%20Unique%20XOR%20Triplets%20II/README_EN.md
|
||||
rating: 1883
|
||||
source: Biweekly Contest 154 Q3
|
||||
tags:
|
||||
- Bit Manipulation
|
||||
- Array
|
||||
|
|
@ -64,7 +66,7 @@ tags:
|
|||
|
||||
<ul>
|
||||
<li><code>1 <= nums.length <= 1500</code></li>
|
||||
<li><code><font face="monospace">1 <= nums[i] <= 1500</font></code></li>
|
||||
<li><code>1 <= nums[i] <= 1500</code></li>
|
||||
</ul>
|
||||
|
||||
<!-- description:end -->
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue