Skip to content

Commit 54c4475

Browse files
yanglbmeidoocs
andauthored
chore: update lc problems (doocs#1712)
* chore: update lc problems * chore: optimised images with calibre/image-actions --------- Co-authored-by: Doocs Bot <doocs-bot@outlook.com>
1 parent 435f106 commit 54c4475

File tree

189 files changed

+1238
-1094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+1238
-1094
lines changed

solution/0000-0099/0026.Remove Duplicates from Sorted Array/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!-- 这里写题目描述 -->
88

9-
<p>给你一个 <strong>升序排列</strong> 的数组 <code>nums</code> ,请你<strong><a href="http://baike.baidu.com/item/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95" target="_blank"> 原地</a></strong> 删除重复出现的元素,使每个元素 <strong>只出现一次</strong> ,返回删除后数组的新长度。元素的 <strong>相对顺序</strong> 应该保持 <strong>一致</strong> 。然后返回 <code>nums</code> 中唯一元素的个数。</p>
9+
<p>给你一个 <strong>非严格递增排列</strong> 的数组 <code>nums</code> ,请你<strong><a href="http://baike.baidu.com/item/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95" target="_blank"> 原地</a></strong> 删除重复出现的元素,使每个元素 <strong>只出现一次</strong> ,返回删除后数组的新长度。元素的 <strong>相对顺序</strong> 应该保持 <strong>一致</strong> 。然后返回 <code>nums</code> 中唯一元素的个数。</p>
1010

1111
<p>考虑 <code>nums</code> 的唯一元素的数量为 <code>k</code> ,你需要做以下事情确保你的题解可以被通过:</p>
1212

@@ -57,7 +57,7 @@ for (int i = 0; i &lt; k; i++) {
5757
<ul>
5858
<li><code>1 &lt;= nums.length &lt;= 3 * 10<sup>4</sup></code></li>
5959
<li><code>-10<sup>4</sup> &lt;= nums[i] &lt;= 10<sup>4</sup></code></li>
60-
<li><code>nums</code> 已按 <strong>升序</strong> 排列</li>
60+
<li><code>nums</code> 已按 <strong>非严格递增</strong>&nbsp;排列</li>
6161
</ul>
6262

6363
## 解法

solution/0100-0199/0138.Copy List with Random Pointer/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [138. 复制带随机指针的链表](https://leetcode.cn/problems/copy-list-with-random-pointer)
1+
# [138. 随机链表的复制](https://leetcode.cn/problems/copy-list-with-random-pointer)
22

33
[English Version](/solution/0100-0199/0138.Copy%20List%20with%20Random%20Pointer/README_EN.md)
44

@@ -62,6 +62,10 @@
6262
<li><code>Node.random</code>&nbsp;为&nbsp;<code>null</code> 或指向链表中的节点。</li>
6363
</ul>
6464

65+
<p>注意:本题与主站 138 题相同:<a href="https://leetcode.cn/problems/copy-list-with-random-pointer/" rel="noopener noreferrer" target="_blank">https://leetcode.cn/problems/copy-list-with-random-pointer/</a></p>
66+
67+
<p>&nbsp;</p>
68+
6569
## 解法
6670

6771
<!-- 这里可写通用的实现逻辑 -->

solution/0200-0299/0238.Product of Array Except Self/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<p>题目数据 <strong>保证</strong> 数组&nbsp;<code>nums</code>之中任意元素的全部前缀元素和后缀的乘积都在&nbsp; <strong>32 位</strong> 整数范围内。</p>
1212

13-
<p>请<strong>不要使用除法,</strong>且在&nbsp;<code>O(<em>n</em>)</code> 时间复杂度内完成此题。</p>
13+
<p>请&nbsp;<strong>不要使用除法,</strong>且在&nbsp;<code>O(<em>n</em>)</code> 时间复杂度内完成此题。</p>
1414

1515
<p>&nbsp;</p>
1616

@@ -40,7 +40,7 @@
4040

4141
<p>&nbsp;</p>
4242

43-
<p><strong>进阶:</strong>你可以在 <code>O(1)</code>&nbsp;的额外空间复杂度内完成这个题目吗?( 出于对空间复杂度分析的目的,输出数组<strong>不被视为</strong>额外空间。)</p>
43+
<p><strong>进阶:</strong>你可以在 <code>O(1)</code>&nbsp;的额外空间复杂度内完成这个题目吗?( 出于对空间复杂度分析的目的,输出数组&nbsp;<strong>不被视为&nbsp;</strong>额外空间。)</p>
4444

4545
## 解法
4646

solution/0200-0299/0238.Product of Array Except Self/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</ul>
2929

3030
<p>&nbsp;</p>
31-
<p><strong>Follow up:</strong>&nbsp;Can you solve the problem in <code>O(1)&nbsp;</code>extra&nbsp;space complexity? (The output array <strong>does not</strong> count as extra space for space complexity analysis.)</p>
31+
<p><strong>Follow up:</strong>&nbsp;Can you solve the problem in <code>O(1)</code>&nbsp;extra&nbsp;space complexity? (The output array <strong>does not</strong> count as extra space for space complexity analysis.)</p>
3232

3333
## Solutions
3434

solution/0400-0499/0460.LFU Cache/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ul>
1414
<li><code>LFUCache(int capacity)</code> - 用数据结构的容量&nbsp;<code>capacity</code> 初始化对象</li>
1515
<li><code>int get(int key)</code>&nbsp;- 如果键&nbsp;<code>key</code> 存在于缓存中,则获取键的值,否则返回 <code>-1</code> 。</li>
16-
<li><code>void put(int key, int value)</code>&nbsp;- 如果键&nbsp;<code>key</code> 已存在,则变更其值;如果键不存在,请插入键值对。当缓存达到其容量&nbsp;<code>capacity</code> 时,则应该在插入新项之前,移除最不经常使用的项。在此问题中,当存在平局(即两个或更多个键具有相同使用频率)时,应该去除 <strong>最近最久未使用</strong> 的键。</li>
16+
<li><code>void put(int key, int value)</code>&nbsp;- 如果键&nbsp;<code>key</code> 已存在,则变更其值;如果键不存在,请插入键值对。当缓存达到其容量&nbsp;<code>capacity</code> 时,则应该在插入新项之前,移除最不经常使用的项。在此问题中,当存在平局(即两个或更多个键具有相同使用频率)时,应该去除 <strong>最久未使用</strong> 的键。</li>
1717
</ul>
1818

1919
<p>为了确定最不常使用的键,可以为缓存中的每个键维护一个 <strong>使用计数器</strong> 。使用计数最小的键是最久未使用的键。</p>

solution/0400-0499/0475.Heaters/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@
66

77
<!-- 这里写题目描述 -->
88

9-
<p>冬季已经来临。 你的任务是设计一个有固定加热半径的供暖器向所有房屋供暖。</p>
9+
<p>冬季已经来临。&nbsp;你的任务是设计一个有固定加热半径的供暖器向所有房屋供暖。</p>
1010

1111
<p>在加热器的加热半径范围内的每个房屋都可以获得供暖。</p>
1212

13-
<p>现在,给出位于一条水平线上的房屋 <code>houses</code> 和供暖器 <code>heaters</code> 的位置,请你找出并返回可以覆盖所有房屋的最小加热半径。</p>
13+
<p>现在,给出位于一条水平线上的房屋&nbsp;<code>houses</code> 和供暖器&nbsp;<code>heaters</code> 的位置,请你找出并返回可以覆盖所有房屋的最小加热半径。</p>
1414

15-
<p><strong>说明</strong>:所有供暖器都遵循你的半径标准,加热的半径也一样。</p>
15+
<p><b>注意</b>:所有供暖器 <code>heaters</code> 都遵循你的半径标准,加热的半径也一样。</p>
1616

17-
<p> </p>
17+
<p>&nbsp;</p>
1818

1919
<p><strong>示例 1:</strong></p>
2020

2121
<pre>
2222
<strong>输入:</strong> houses = [1,2,3], heaters = [2]
2323
<strong>输出:</strong> 1
24-
<strong>解释:</strong> 仅在位置2上有一个供暖器。如果我们将加热半径设为1,那么所有房屋就都能得到供暖。
24+
<strong>解释:</strong> 仅在位置 2 上有一个供暖器。如果我们将加热半径设为 1,那么所有房屋就都能得到供暖。
2525
</pre>
2626

2727
<p><strong>示例 2:</strong></p>
2828

2929
<pre>
3030
<strong>输入:</strong> houses = [1,2,3,4], heaters = [1,4]
3131
<strong>输出:</strong> 1
32-
<strong>解释:</strong> 在位置1, 4上有两个供暖器。我们需要将加热半径设为1,这样所有房屋就都能得到供暖。
32+
<strong>解释:</strong> 在位置 1, 4 上有两个供暖器。我们需要将加热半径设为 1,这样所有房屋就都能得到供暖。
3333
</pre>
3434

3535
<p><strong>示例 3:</strong></p>
@@ -39,13 +39,13 @@
3939
<strong>输出:</strong>3
4040
</pre>
4141

42-
<p> </p>
42+
<p>&nbsp;</p>
4343

4444
<p><strong>提示:</strong></p>
4545

4646
<ul>
47-
<li><code>1 <= houses.length, heaters.length <= 3 * 10<sup>4</sup></code></li>
48-
<li><code>1 <= houses[i], heaters[i] <= 10<sup>9</sup></code></li>
47+
<li><code>1 &lt;= houses.length, heaters.length &lt;= 3 * 10<sup>4</sup></code></li>
48+
<li><code>1 &lt;= houses[i], heaters[i] &lt;= 10<sup>9</sup></code></li>
4949
</ul>
5050

5151
## 解法

solution/0400-0499/0475.Heaters/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<pre>
2727
<strong>Input:</strong> houses = [1,2,3,4], heaters = [1,4]
2828
<strong>Output:</strong> 1
29-
<strong>Explanation:</strong> The two heater was placed in the position 1 and 4. We need to use radius 1 standard, then all the houses can be warmed.
29+
<strong>Explanation:</strong> The two heaters were placed at positions 1 and 4. We need to use a radius 1 standard, then all the houses can be warmed.
3030
</pre>
3131

3232
<p><strong class="example">Example 3:</strong></p>

solution/0500-0599/0533.Lonely Pixel II/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<p>&nbsp;</p>
1919

2020
<p><strong>示例 1:</strong></p>
21-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0500-0599/0533.Lonely%20Pixel%20II/images/pixel2-1-grid.jpg" style="width: 493px; height: 333px;" />
21+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0500-0599/0533.Lonely%20Pixel%20II/images/1694957797-UWXAxl-image.png" style="width: 493px; height: 333px;" />
2222
<pre>
2323
<strong>输入:</strong>picture = [["W","B","W","B","B","W"],["W","B","W","B","B","W"],["W","B","W","B","B","W"],["W","W","B","W","B","W"]], target = 3
2424
<strong>输出:</strong>6
@@ -29,7 +29,7 @@
2929
</pre>
3030

3131
<p><strong>示例 2:</strong></p>
32-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0500-0599/0533.Lonely%20Pixel%20II/images/pixel2-2-grid.jpg" style="width: 253px; height: 253px;" />
32+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0500-0599/0533.Lonely%20Pixel%20II/images/1694957806-FyCCMF-image.png" style="width: 253px; height: 253px;" />
3333
<pre>
3434
<strong>输入:</strong>picture = [["W","W","B"],["W","W","B"],["W","W","B"]], target = 1
3535
<strong>输出:</strong>0
Loading
Loading

solution/0500-0599/0544.Output Contest Matches/README.md

+22-26
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,35 @@
66

77
<!-- 这里写题目描述 -->
88

9-
<p>在 NBA 季后赛中,我们总是安排较强的队伍对战较弱的队伍,例如用排名第 1 的队伍和第 n 的队伍对决,这是一个可以让比赛更加有趣的好策略。现在,给你&nbsp;<strong>n&nbsp;</strong>支队伍,你需要以字符串格式输出它们的&nbsp;<strong>最终&nbsp;</strong>比赛配对。</p>
9+
<p>&nbsp;</p>
1010

11-
<p><strong>n </strong>支队伍按从 1 到 n 的正整数格式给出,分别代表它们的初始排名(排名 1 最强,排名 n 最弱)。我们用括号(&#39;(&#39;, &#39;)&#39;)和逗号(&#39;,&#39;)来表示匹配对&mdash;&mdash;括号(&#39;(&#39;, &#39;)&#39;)表示匹配,逗号(&#39;,&#39;)来用于分割。&nbsp;在每一轮的匹配过程中,你都需要遵循将强队与弱队配对的原则。</p>
11+
<p>在 NBA 季后赛期间,我们总是安排相对强大的球队与相对弱小的球队比赛,就像让排名第 <code>1</code> 的球队与排名第 <code>n</code> 的球队比赛一样,这是一种使比赛更加有趣的好策略。</p>
1212

13-
<p>&nbsp;</p>
13+
<p>现给定 <code>n</code> 支球队,请以字符串的形式返回它们的最终的比赛匹配方案。</p>
1414

15-
<p><strong>示例 1:</strong></p>
15+
<p>这 <code>n</code> 支球队从 <code>1</code> 到 <code>n</code> 进行标记,代表它们的初始排名(即,排名 <code>1</code> 的是最强的球队,排名 <code>n</code> 的是最弱的球队)。</p>
1616

17-
<pre><strong>输入:</strong> 2
18-
<strong>输出:</strong> (1,2)
19-
<strong>解析:</strong>
20-
初始地,我们有队1和队2两支队伍,按照1,2排列。
21-
因此 用 &#39;(&#39;, &#39;)&#39;&#39;,&#39;来将队1和队2进行配对,得到最终答案。
22-
</pre>
17+
<p>我们将使用括号 <code>'('</code> 和 <code>')'</code> 以及逗号 <code>','</code> 来表示比赛的匹配情况。我们使用括号来表示匹配,逗号来表示分组。在每一轮的匹配过程中,你总是需要遵循使相对强大的球队与相对弱小的球队配对的策略。</p>
2318

24-
<p><strong>示例 2:</strong></p>
19+
<p>&nbsp;</p>
2520

26-
<pre><strong>输入:</strong> 4
27-
<strong>输出:</strong> ((1,4),(2,3))
28-
<strong>解析:</strong>
29-
在第一轮,我们将队伍1和4配对,2和3配对,以满足将强队和弱队搭配的效果。得到(1,4),(2,3).
21+
<p><strong>示例 1:</strong></p>
22+
23+
<pre>
24+
<strong>输入:</strong> n = 4
25+
<strong>输出:</strong> "((1,4),(2,3))"
26+
<strong>解释:</strong>
27+
在第一轮,我们将队伍 1 和 4 配对,2 和 3 配对,以满足将强队和弱队搭配的效果。得到(1,4),(2,3).
3028
在第二轮,(1,4) 和 (2,3) 的赢家需要进行比赛以确定最终赢家,因此需要再在外面加一层括号。
3129
于是最终答案是((1,4),(2,3))。
3230
</pre>
3331

34-
<p><strong>示例 3:</strong></p>
32+
<p><strong>示例 2:</strong></p>
3533

36-
<pre><strong>输入:</strong> 8
37-
<strong>输出:</strong> (((1,8),(4,5)),((2,7),(3,6)))
38-
<strong>解析:</strong>
34+
<pre>
35+
<strong>输入:</strong> n = 8
36+
<strong>输出:</strong> "(((1,8),(4,5)),((2,7),(3,6)))"
37+
<strong>解释:</strong>
3938
第一轮: (1,8),(2,7),(3,6),(4,5)
4039
第二轮: ((1,8),(4,5)),((2,7),(3,6))
4140
第三轮 (((1,8),(4,5)),((2,7),(3,6)))
@@ -44,14 +43,11 @@
4443

4544
<p>&nbsp;</p>
4645

47-
<p><strong>注意:</strong></p>
46+
<p><strong>提示:</strong></p>
4847

49-
<ol>
50-
<li><strong>n&nbsp;</strong>的范围是&nbsp;[2, 2<sup>12</sup>].</li>
51-
<li>保证 n 可以写成&nbsp;2<sup>k</sup>&nbsp;的形式,其中 k 是正整数。</li>
52-
</ol>
53-
54-
<p>&nbsp;</p>
48+
<ul>
49+
<li><code>n == 2x</code>,并且 <code>x</code> 在范围 <code>[1,12]</code> 内。</li>
50+
</ul>
5551

5652
## 解法
5753

solution/0500-0599/0544.Output Contest Matches/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Description
66

7-
<p>During the NBA playoffs, we always set the rather strong team to play with the rather weak team, like make the rank <code>1</code> team play with the rank <code>n<sup>th</sup></code> team, which is a good strategy to make the contest more interesting.</p>
7+
<p>During the NBA playoffs, we always set the rather strong team to play with the rather weak team, like making&nbsp;the rank <code>1</code> team play with the rank <code>n<sup>th</sup></code> team, which is a good strategy to make the contest more interesting.</p>
88

99
<p>Given <code>n</code> teams, return <em>their final contest matches in the form of a string</em>.</p>
1010

solution/0600-0699/0626.Exchange Seats/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
| Column Name | Type |
1414
+-------------+---------+
1515
| id | int |
16-
| name | varchar |
16+
| student | varchar |
1717
+-------------+---------+
1818
<code>id</code> 是该表的主键(唯一值)列。
1919
该表的每一行都表示学生的姓名和 ID。

solution/0700-0799/0735.Asteroid Collision/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# [735. 行星碰撞](https://leetcode.cn/problems/asteroid-collision)
1+
# [735. 小行星碰撞](https://leetcode.cn/problems/asteroid-collision)
22

33
[English Version](/solution/0700-0799/0735.Asteroid%20Collision/README_EN.md)
44

55
## 题目描述
66

77
<!-- 这里写题目描述 -->
88

9-
<p>给定一个整数数组 <code>asteroids</code>,表示在同一行的行星。</p>
9+
<p>给定一个整数数组 <code>asteroids</code>,表示在同一行的小行星。</p>
1010

11-
<p>对于数组中的每一个元素,其绝对值表示行星的大小,正负表示行星的移动方向(正表示向右移动,负表示向左移动)。每一颗行星以相同的速度移动。</p>
11+
<p>对于数组中的每一个元素,其绝对值表示小行星的大小,正负表示小行星的移动方向(正表示向右移动,负表示向左移动)。每一颗小行星以相同的速度移动。</p>
1212

13-
<p>找出碰撞后剩下的所有行星。碰撞规则:两个行星相互碰撞,较小的行星会爆炸。如果两颗行星大小相同,则两颗行星都会爆炸。两颗移动方向相同的行星,永远不会发生碰撞。</p>
13+
<p>找出碰撞后剩下的所有小行星。碰撞规则:两个小行星相互碰撞,较小的小行星会爆炸。如果两颗小行星大小相同,则两颗小行星都会爆炸。两颗移动方向相同的小行星,永远不会发生碰撞。</p>
1414

1515
<p>&nbsp;</p>
1616

solution/0900-0999/0944.Delete Columns to Make Sorted/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ abc
1515
bce
1616
cae</pre>
1717

18-
<p>你需要找出并删除 <strong>不是按字典序升序排列的</strong> 列。在上面的例子(下标从 0 开始)中,列 0(<code>'a'</code>, <code>'b'</code>, <code>'c'</code>)和列 2(<code>'c'</code>, <code>'e'</code>, <code>'e'</code>)都是按升序排列的,而列 1(<code>'b'</code>, <code>'c'</code>, <code>'a'</code>)不是,所以要删除列 1 。</p>
18+
<p>你需要找出并删除 <strong>不是按字典序非严格递增排列的</strong> 列。在上面的例子(下标从 0 开始)中,列 0(<code>'a'</code>, <code>'b'</code>, <code>'c'</code>)和列 2(<code>'c'</code>, <code>'e'</code>, <code>'e'</code>)都是按字典序非严格递增排列的,而列 1(<code>'b'</code>, <code>'c'</code>, <code>'a'</code>)不是,所以要删除列 1 。</p>
1919

2020
<p>返回你需要删除的列数。</p>
2121

22-
<p> </p>
22+
<p>&nbsp;</p>
2323

2424
<p><strong>示例 1:</strong></p>
2525

@@ -56,14 +56,14 @@ cae</pre>
5656
所有 3 列都是非升序排列的,所以都要删除。
5757
</pre>
5858

59-
<p> </p>
59+
<p>&nbsp;</p>
6060

6161
<p><strong>提示:</strong></p>
6262

6363
<ul>
6464
<li><code>n == strs.length</code></li>
65-
<li><code>1 <= n <= 100</code></li>
66-
<li><code>1 <= strs[i].length <= 1000</code></li>
65+
<li><code>1 &lt;= n &lt;= 100</code></li>
66+
<li><code>1 &lt;= strs[i].length &lt;= 1000</code></li>
6767
<li><code>strs[i]</code> 由小写英文字母组成</li>
6868
</ul>
6969

solution/1100-1199/1147.Longest Chunked Palindrome Decomposition/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<pre>
4040
<strong>输入:</strong>text = "antaprezatepzapreanta"
4141
<strong>输出:</strong>11
42-
<strong>解释:</strong>我们可以把字符串拆分成 "(a)(nt)(a)(pre)(za)(tpe)(za)(pre)(a)(nt)(a)"。
42+
<strong>解释:</strong>我们可以把字符串拆分成 "(a)(nt)(a)(pre)(za)(tep)(za)(pre)(a)(nt)(a)"。
4343
</pre>
4444

4545
<p>&nbsp;</p>

solution/1100-1199/1164.Product Price at a Given Date/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@
1616
| new_price | int |
1717
| change_date | date |
1818
+---------------+---------+
19-
这张表的主键是 (product_id, change_date)。
19+
(product_id, change_date) 是此表的主键(具有唯一值的列组合)
2020
这张表的每一行分别记录了 某产品 在某个日期 更改后 的新价格。</pre>
2121

2222
<p>&nbsp;</p>
2323

24-
<p>写一段 SQL来查找在&nbsp;<code>2019-08-16</code><strong> </strong>时全部产品的价格,假设所有产品在修改前的价格都是&nbsp;<code>10</code><strong> 。</strong></p>
24+
<p>编写一个解决方案,找出在&nbsp;<code>2019-08-16</code><strong> </strong>时全部产品的价格,假设所有产品在修改前的价格都是&nbsp;<code>10</code><strong> 。</strong></p>
2525

2626
<p>以 <strong>任意顺序 </strong>返回结果表。</p>
2727

28-
<p>查询结果格式如下例所示。</p>
28+
<p>结果格式如下例所示。</p>
2929

3030
<p>&nbsp;</p>
3131

3232
<p><strong>示例 1:</strong></p>
3333

3434
<pre>
35-
<code><strong>输入:</strong>
36-
Products</code> 表:
35+
<strong>输入:</strong>
36+
Products 表:
3737
+------------+-----------+-------------+
3838
| product_id | new_price | change_date |
3939
+------------+-----------+-------------+

solution/1100-1199/1164.Product Price at a Given Date/README_EN.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
| new_price | int |
1515
| change_date | date |
1616
+---------------+---------+
17-
(product_id, change_date) is the primary key of this table.
17+
(product_id, change_date) is the primary key (combination of columns with unique values) of this table.
1818
Each row of this table indicates that the price of some product was changed to a new price at some date.</pre>
1919

2020
<p>&nbsp;</p>
2121

22-
<p>Write an SQL query to find the prices of all products on <code>2019-08-16</code>. Assume the price of all products before any change is <code>10</code>.</p>
22+
<p>Write a solution to find the prices of all products on <code>2019-08-16</code>. Assume the price of all products before any change is <code>10</code>.</p>
2323

2424
<p>Return the result table in <strong>any order</strong>.</p>
2525

26-
<p>The query result format is in the following example.</p>
26+
<p>The&nbsp;result format is in the following example.</p>
2727

2828
<p>&nbsp;</p>
2929
<p><strong class="example">Example 1:</strong></p>

0 commit comments

Comments
 (0)