Skip to content

Commit aad7846

Browse files
author
Shuo
committed
A: new
1 parent 40ca651 commit aad7846

File tree

23 files changed

+726
-42
lines changed

23 files changed

+726
-42
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ LeetCode Problems' Solutions
6262

6363
| # | Title | Solution | Difficulty |
6464
| :-: | - | - | :-: |
65+
| <span id="1467">1467</span> | [Probability of a Two Boxes Having The Same Number of Distinct Balls](https://leetcode.com/problems/probability-of-a-two-boxes-having-the-same-number-of-distinct-balls "两个盒子中不同颜色的球数量相同的概率") | [Go](problems/probability-of-a-two-boxes-having-the-same-number-of-distinct-balls) | Hard |
66+
| <span id="1466">1466</span> | [Reorder Routes to Make All Paths Lead to the City Zero](https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero "重新规划路线") | [Go](problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero) | Medium |
67+
| <span id="1465">1465</span> | [Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts](https://leetcode.com/problems/maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts "切割后面积最大的蛋糕") | [Go](problems/maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts) | Medium |
68+
| <span id="1464">1464</span> | [Maximum Product of Two Elements in an Array](https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array "数组中两元素的最大乘积") | [Go](problems/maximum-product-of-two-elements-in-an-array) | Easy |
69+
| <span id="1463">1463</span> | [Cherry Pickup II](https://leetcode.com/problems/cherry-pickup-ii "摘樱桃 II") | [Go](problems/cherry-pickup-ii) | Hard |
70+
| <span id="1462">1462</span> | [Course Schedule IV](https://leetcode.com/problems/course-schedule-iv "课程安排 IV") | [Go](problems/course-schedule-iv) | Medium |
71+
| <span id="1461">1461</span> | [Check If a String Contains All Binary Codes of Size K](https://leetcode.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k "检查一个字符串是否包含所有大小为 K 的二进制子串") | [Go](problems/check-if-a-string-contains-all-binary-codes-of-size-k) | Medium |
72+
| <span id="1460">1460</span> | [Make Two Arrays Equal by Reversing Sub-arrays](https://leetcode.com/problems/make-two-arrays-equal-by-reversing-sub-arrays "通过翻转子数组使两个数组相等") | [Go](problems/make-two-arrays-equal-by-reversing-sub-arrays) | Easy |
73+
| <span id="1459">1459</span> | [Rectangles Area](https://leetcode.com/problems/rectangles-area) 🔒 | [MySQL](problems/rectangles-area) | Medium |
6574
| <span id="1458">1458</span> | [Max Dot Product of Two Subsequences](https://leetcode.com/problems/max-dot-product-of-two-subsequences "两个子序列的最大点积") | [Go](problems/max-dot-product-of-two-subsequences) | Hard |
6675
| <span id="1457">1457</span> | [Pseudo-Palindromic Paths in a Binary Tree](https://leetcode.com/problems/pseudo-palindromic-paths-in-a-binary-tree "二叉树中的伪回文路径") | [Go](problems/pseudo-palindromic-paths-in-a-binary-tree) | Medium |
6776
| <span id="1456">1456</span> | [Maximum Number of Vowels in a Substring of Given Length](https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length "定长子串中元音的最大数目") | [Go](problems/maximum-number-of-vowels-in-a-substring-of-given-length) | Medium |
@@ -80,7 +89,7 @@ LeetCode Problems' Solutions
8089
| <span id="1443">1443</span> | [Minimum Time to Collect All Apples in a Tree](https://leetcode.com/problems/minimum-time-to-collect-all-apples-in-a-tree "收集树上所有苹果的最少时间") | [Go](problems/minimum-time-to-collect-all-apples-in-a-tree) | Medium |
8190
| <span id="1442">1442</span> | [Count Triplets That Can Form Two Arrays of Equal XOR](https://leetcode.com/problems/count-triplets-that-can-form-two-arrays-of-equal-xor "形成两个异或相等数组的三元组数目") | [Go](problems/count-triplets-that-can-form-two-arrays-of-equal-xor) | Medium |
8291
| <span id="1441">1441</span> | [Build an Array With Stack Operations](https://leetcode.com/problems/build-an-array-with-stack-operations "用栈操作构建数组") | [Go](problems/build-an-array-with-stack-operations) | Easy |
83-
| <span id="1440">1440</span> | [Evaluate Boolean Expression](https://leetcode.com/problems/evaluate-boolean-expression) 🔒 | [MySQL](problems/evaluate-boolean-expression) | Medium |
92+
| <span id="1440">1440</span> | [Evaluate Boolean Expression](https://leetcode.com/problems/evaluate-boolean-expression "计算布尔表达式的值") 🔒 | [MySQL](problems/evaluate-boolean-expression) | Medium |
8493
| <span id="1439">1439</span> | [Find the Kth Smallest Sum of a Matrix With Sorted Rows](https://leetcode.com/problems/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows "有序矩阵中的第 k 个最小数组和") | [Go](problems/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows) | Hard |
8594
| <span id="1438">1438</span> | [Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit](https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit "绝对差不超过限制的最长连续子数组") | [Go](problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit) | Medium |
8695
| <span id="1437">1437</span> | [Check If All 1's Are at Least Length K Places Away](https://leetcode.com/problems/check-if-all-1s-are-at-least-length-k-places-away "是否所有 1 都至少相隔 k 个元素") | [Go](problems/check-if-all-1s-are-at-least-length-k-places-away) | Medium |

problems/3sum-closest/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,24 @@
1313

1414
<p>Given an array <code>nums</code> of <em>n</em> integers and an integer <code>target</code>, find three integers in <code>nums</code>&nbsp;such that the sum is closest to&nbsp;<code>target</code>. Return the sum of the three integers. You may assume that each input would have exactly one solution.</p>
1515

16-
<p><strong>Example:</strong></p>
16+
<p>&nbsp;</p>
17+
<p><strong>Example 1:</strong></p>
1718

1819
<pre>
19-
Given array nums = [-1, 2, 1, -4], and target = 1.
20-
21-
The sum that is closest to the target is 2. (-1 + 2 + 1 = 2).
20+
<strong>Input:</strong> nums = [-1,2,1,-4], target = 1
21+
<strong>Output:</strong> 2
22+
<strong>Explanation:</strong> The sum that is closest to the target is 2. (-1 + 2 + 1 = 2).
2223
</pre>
2324

25+
<p>&nbsp;</p>
26+
<p><strong>Constraints:</strong></p>
27+
28+
<ul>
29+
<li><code>3 &lt;= nums.length &lt;= 10^3</code></li>
30+
<li><code>-10^3&nbsp;&lt;= nums[i]&nbsp;&lt;= 10^3</code></li>
31+
<li><code>-10^4&nbsp;&lt;= target&nbsp;&lt;= 10^4</code></li>
32+
</ul>
33+
2434
### Related Topics
2535
[[Array](../../tag/array/README.md)]
2636
[[Two Pointers](../../tag/two-pointers/README.md)]
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<!--|This file generated by command(leetcode description); DO NOT EDIT. |-->
2+
<!--+----------------------------------------------------------------------+-->
3+
<!--|@author openset <openset.wang@gmail.com> |-->
4+
<!--|@link https://github.com/openset |-->
5+
<!--|@home https://github.com/openset/leetcode |-->
6+
<!--+----------------------------------------------------------------------+-->
7+
8+
[< Previous](../make-two-arrays-equal-by-reversing-sub-arrays "Make Two Arrays Equal by Reversing Sub-arrays")
9+
                
10+
[Next >](../course-schedule-iv "Course Schedule IV")
11+
12+
## [1461. Check If a String Contains All Binary Codes of Size K (Medium)](https://leetcode.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k "检查一个字符串是否包含所有长度为 K 的二进制子串")
13+
14+
<p>Given a binary string <code>s</code> and an integer <code>k</code>.</p>
15+
16+
<p>Return <em>True</em> if all binary codes of length <code>k</code> is a substring of <code>s</code>. Otherwise, return <em>False</em>.</p>
17+
18+
<p>&nbsp;</p>
19+
<p><strong>Example 1:</strong></p>
20+
21+
<pre>
22+
<strong>Input:</strong> s = &quot;00110110&quot;, k = 2
23+
<strong>Output:</strong> true
24+
<strong>Explanation:</strong> The binary codes of length 2 are &quot;00&quot;, &quot;01&quot;, &quot;10&quot; and &quot;11&quot;. They can be all found as substrings at indicies 0, 1, 3 and 2 respectively.
25+
</pre>
26+
27+
<p><strong>Example 2:</strong></p>
28+
29+
<pre>
30+
<strong>Input:</strong> s = &quot;00110&quot;, k = 2
31+
<strong>Output:</strong> true
32+
</pre>
33+
34+
<p><strong>Example 3:</strong></p>
35+
36+
<pre>
37+
<strong>Input:</strong> s = &quot;0110&quot;, k = 1
38+
<strong>Output:</strong> true
39+
<strong>Explanation:</strong> The binary codes of length 1 are &quot;0&quot; and &quot;1&quot;, it is clear that both exist as a substring.
40+
</pre>
41+
42+
<p><strong>Example 4:</strong></p>
43+
44+
<pre>
45+
<strong>Input:</strong> s = &quot;0110&quot;, k = 2
46+
<strong>Output:</strong> false
47+
<strong>Explanation:</strong> The binary code &quot;00&quot; is of length 2 and doesn&#39;t exist in the array.
48+
</pre>
49+
50+
<p><strong>Example 5:</strong></p>
51+
52+
<pre>
53+
<strong>Input:</strong> s = &quot;0000000001011100&quot;, k = 4
54+
<strong>Output:</strong> false
55+
</pre>
56+
57+
<p>&nbsp;</p>
58+
<p><strong>Constraints:</strong></p>
59+
60+
<ul>
61+
<li><code>1 &lt;= s.length &lt;= 5 * 10^5</code></li>
62+
<li><code>s</code> consists of 0&#39;s and 1&#39;s only.</li>
63+
<li><code>1 &lt;= k &lt;= 20</code></li>
64+
</ul>
65+
66+
### Related Topics
67+
[[Bit Manipulation](../../tag/bit-manipulation/README.md)]
68+
[[String](../../tag/string/README.md)]
69+
70+
### Hints
71+
<details>
72+
<summary>Hint 1</summary>
73+
We need only to check all sub-strings of length k.
74+
</details>
75+
76+
<details>
77+
<summary>Hint 2</summary>
78+
The number of distinct sub-strings should be exactly 2^k.
79+
</details>
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!--|This file generated by command(leetcode description); DO NOT EDIT. |-->
2+
<!--+----------------------------------------------------------------------+-->
3+
<!--|@author openset <openset.wang@gmail.com> |-->
4+
<!--|@link https://github.com/openset |-->
5+
<!--|@home https://github.com/openset/leetcode |-->
6+
<!--+----------------------------------------------------------------------+-->
7+
8+
[< Previous](../course-schedule-iv "Course Schedule IV")
9+
                
10+
[Next >](../maximum-product-of-two-elements-in-an-array "Maximum Product of Two Elements in an Array")
11+
12+
## [1463. Cherry Pickup II (Hard)](https://leetcode.com/problems/cherry-pickup-ii "摘樱桃 II")
13+
14+
<p>Given a <code>rows x cols</code> matrix <code>grid</code> representing a field of cherries.&nbsp;Each cell in&nbsp;<code>grid</code>&nbsp;represents the number of cherries that you can collect.</p>
15+
16+
<p>You have two&nbsp;robots that can collect cherries for you, Robot #1 is located at the top-left corner (0,0) , and Robot #2 is located at the top-right corner (0, cols-1) of the grid.</p>
17+
18+
<p>Return the maximum number of cherries collection using both robots&nbsp; by following the rules below:</p>
19+
20+
<ul>
21+
<li>From a cell (i,j), robots can move to cell (i+1, j-1) , (i+1, j) or (i+1, j+1).</li>
22+
<li>When any robot is passing through a cell, It picks it up all cherries, and the cell becomes an empty cell (0).</li>
23+
<li>When both robots stay on the same cell, only one of them takes the cherries.</li>
24+
<li>Both robots cannot move outside of the grid at&nbsp;any moment.</li>
25+
<li>Both robots should reach the bottom row in the <code>grid</code>.</li>
26+
</ul>
27+
28+
<p>&nbsp;</p>
29+
<p><strong>Example 1:</strong></p>
30+
31+
<p><strong><img alt="" src="https://assets.leetcode.com/uploads/2020/04/29/sample_1_1802.png" style="width: 139px; height: 182px;" /></strong></p>
32+
33+
<pre>
34+
<strong>Input:</strong> grid = [[3,1,1],[2,5,1],[1,5,5],[2,1,1]]
35+
<strong>Output:</strong> 24
36+
<strong>Explanation:</strong>&nbsp;Path of robot #1 and #2 are described in color green and blue respectively.
37+
Cherries taken by Robot #1, (3 + 2 + 5 + 2) = 12.
38+
Cherries taken by Robot #2, (1 + 5 + 5 + 1) = 12.
39+
Total of cherries: 12 + 12 = 24.
40+
</pre>
41+
42+
<p><strong>Example 2:</strong></p>
43+
44+
<p><strong><img alt="" src="https://assets.leetcode.com/uploads/2020/04/23/sample_2_1802.png" style="width: 284px; height: 257px;" /></strong></p>
45+
46+
<pre>
47+
<strong>Input:</strong> grid = [[1,0,0,0,0,0,1],[2,0,0,0,0,3,0],[2,0,9,0,0,0,0],[0,3,0,5,4,0,0],[1,0,2,3,0,0,6]]
48+
<strong>Output:</strong> 28
49+
<strong>Explanation:</strong>&nbsp;Path of robot #1 and #2 are described in color green and blue respectively.
50+
Cherries taken by Robot #1, (1 + 9 + 5 + 2) = 17.
51+
Cherries taken by Robot #2, (1 + 3 + 4 + 3) = 11.
52+
Total of cherries: 17 + 11 = 28.
53+
</pre>
54+
55+
<p><strong>Example 3:</strong></p>
56+
57+
<pre>
58+
<strong>Input:</strong> grid = [[1,0,0,3],[0,0,0,3],[0,0,3,3],[9,0,3,3]]
59+
<strong>Output:</strong> 22
60+
</pre>
61+
62+
<p><strong>Example 4:</strong></p>
63+
64+
<pre>
65+
<strong>Input:</strong> grid = [[1,1],[1,1]]
66+
<strong>Output:</strong> 4
67+
</pre>
68+
69+
<p>&nbsp;</p>
70+
<p><strong>Constraints:</strong></p>
71+
72+
<ul>
73+
<li><code>rows == grid.length</code></li>
74+
<li><code>cols == grid[i].length</code></li>
75+
<li><code>2 &lt;= rows, cols &lt;= 70</code></li>
76+
<li><code>0 &lt;= grid[i][j] &lt;= 100&nbsp;</code></li>
77+
</ul>
78+
79+
### Related Topics
80+
[[Dynamic Programming](../../tag/dynamic-programming/README.md)]
81+
82+
### Hints
83+
<details>
84+
<summary>Hint 1</summary>
85+
Use dynammic programming, define DP[i][j][k]: The maximum cherries that both robots can take starting on the ith row, and column j and k of Robot 1 and 2 respectively.
86+
</details>

problems/cinema-seat-allocation/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
<p>A cinema&nbsp;has <code>n</code>&nbsp;rows of seats, numbered from 1 to <code>n</code>&nbsp;and there are ten&nbsp;seats in each row, labelled from 1&nbsp;to 10&nbsp;as shown in the figure above.</p>
1717

18-
<p>Given the array <code>reservedSeats</code> containing the numbers of seats already reserved, for example, <code>reservedSeats[i]=[3,8]</code>&nbsp;means the seat located in row <strong>3</strong> and labelled with <b>8</b>&nbsp;is already reserved.&nbsp;</p>
18+
<p>Given the array <code>reservedSeats</code> containing the numbers of seats already reserved, for example, <code>reservedSeats[i] = [3,8]</code>&nbsp;means the seat located in row <strong>3</strong> and labelled with <b>8</b>&nbsp;is already reserved.</p>
1919

20-
<p><em>Return the maximum number of four-person families you can allocate on the cinema&nbsp;seats.</em> A four-person family occupies fours seats <strong>in one row</strong>, that are <strong>next to each other</strong>. Seats across an aisle (such as [3,3]&nbsp;and [3,4]) are not considered to be next to each other, however, It is permissible for the four-person family to be separated by an aisle, but in that case, <strong>exactly two people</strong> have to sit on each side of the aisle.</p>
20+
<p><em>Return the maximum number of four-person groups&nbsp;you can assign on the cinema&nbsp;seats.</em> A four-person group&nbsp;occupies four&nbsp;adjacent seats <strong>in one single row</strong>. Seats across an aisle (such as [3,3]&nbsp;and [3,4]) are not considered to be adjacent, but there is an exceptional case&nbsp;on which an aisle split&nbsp;a four-person group, in that case, the aisle split&nbsp;a four-person group in the middle,&nbsp;which means to have two people on each side.</p>
2121

2222
<p>&nbsp;</p>
2323
<p><strong>Example 1:</strong></p>
@@ -27,7 +27,7 @@
2727
<pre>
2828
<strong>Input:</strong> n = 3, reservedSeats = [[1,2],[1,3],[1,8],[2,6],[3,1],[3,10]]
2929
<strong>Output:</strong> 4
30-
<strong>Explanation:</strong> The figure above shows the optimal allocation for four families, where seats mark with blue are already reserved and contiguous seats mark with orange are for one family.&nbsp;
30+
<strong>Explanation:</strong> The figure above shows the optimal allocation for four groups, where seats mark with blue are already reserved and contiguous seats mark with orange are for one group.
3131
</pre>
3232

3333
<p><strong>Example 2:</strong></p>
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<!--|This file generated by command(leetcode description); DO NOT EDIT. |-->
2+
<!--+----------------------------------------------------------------------+-->
3+
<!--|@author openset <openset.wang@gmail.com> |-->
4+
<!--|@link https://github.com/openset |-->
5+
<!--|@home https://github.com/openset/leetcode |-->
6+
<!--+----------------------------------------------------------------------+-->
7+
8+
[< Previous](../check-if-a-string-contains-all-binary-codes-of-size-k "Check If a String Contains All Binary Codes of Size K")
9+
                
10+
[Next >](../cherry-pickup-ii "Cherry Pickup II")
11+
12+
## [1462. Course Schedule IV (Medium)](https://leetcode.com/problems/course-schedule-iv "课程安排 IV")
13+
14+
<p>There are a total of <code>n</code> courses you have to take, labeled from <code>0</code> to <code>n-1</code>.</p>
15+
16+
<p>Some courses may have direct prerequisites, for example, to take course 0 you have first to take course 1, which is expressed as a pair: <code>[1,0]</code></p>
17+
18+
<p>Given the total number of courses <code>n</code>,&nbsp;a list of direct&nbsp;<code>prerequisite</code> <strong>pairs</strong> and a list of <code>queries</code> <strong>pairs</strong>.</p>
19+
20+
<p>You should answer for each <code>queries[i]</code> whether the course <code>queries[i][0]</code> is a&nbsp;prerequisite of the course&nbsp;<code>queries[i][1]</code> or not.</p>
21+
22+
<p>Return <em>a list of boolean</em>, the answers to the given <code>queries</code>.</p>
23+
24+
<p>Please note that if course <strong>a</strong> is a prerequisite of course <strong>b</strong> and course <strong>b</strong> is a prerequisite&nbsp;of course <strong>c</strong>, then, course <strong>a</strong> is a&nbsp;prerequisite of course <strong>c</strong>.</p>
25+
26+
<p>&nbsp;</p>
27+
<p><strong>Example 1:</strong></p>
28+
<img alt="" src="https://assets.leetcode.com/uploads/2020/04/17/graph.png" style="width: 300px; height: 300px;" />
29+
<pre>
30+
<strong>Input:</strong> n = 2, prerequisites = [[1,0]], queries = [[0,1],[1,0]]
31+
<strong>Output:</strong> [false,true]
32+
<strong>Explanation:</strong> course 0 is not a prerequisite of course 1 but the opposite is true.
33+
</pre>
34+
35+
<p><strong>Example 2:</strong></p>
36+
37+
<pre>
38+
<strong>Input:</strong> n = 2, prerequisites = [], queries = [[1,0],[0,1]]
39+
<strong>Output:</strong> [false,false]
40+
<strong>Explanation:</strong> There are no prerequisites and each course is independent.
41+
</pre>
42+
43+
<p><strong>Example 3:</strong></p>
44+
<img alt="" src="https://assets.leetcode.com/uploads/2020/04/17/graph-1.png" style="width: 300px; height: 300px;" />
45+
<pre>
46+
<strong>Input:</strong> n = 3, prerequisites = [[1,2],[1,0],[2,0]], queries = [[1,0],[1,2]]
47+
<strong>Output:</strong> [true,true]
48+
</pre>
49+
50+
<p><strong>Example 4:</strong></p>
51+
52+
<pre>
53+
<strong>Input:</strong> n = 3, prerequisites = [[1,0],[2,0]], queries = [[0,1],[2,0]]
54+
<strong>Output:</strong> [false,true]
55+
</pre>
56+
57+
<p><strong>Example 5:</strong></p>
58+
59+
<pre>
60+
<strong>Input:</strong> n = 5, prerequisites = [[0,1],[1,2],[2,3],[3,4]], queries = [[0,4],[4,0],[1,3],[3,0]]
61+
<strong>Output:</strong> [true,false,true,false]
62+
</pre>
63+
64+
<p>&nbsp;</p>
65+
<p><strong>Constraints:</strong></p>
66+
67+
<ul>
68+
<li><code>2 &lt;= n &lt;= 100</code></li>
69+
<li><code>0 &lt;= prerequisite.length &lt;= (n * (n - 1) / 2)</code></li>
70+
<li><code>0 &lt;= prerequisite[i][0], prerequisite[i][1] &lt; n</code></li>
71+
<li><code>prerequisite[i][0] != prerequisite[i][1]</code></li>
72+
<li>The prerequisites graph has no cycles.</li>
73+
<li>The prerequisites graph has no repeated edges.</li>
74+
<li><code>1 &lt;= queries.length &lt;= 10^4</code></li>
75+
<li><code>queries[i][0] != queries[i][1]</code></li>
76+
</ul>
77+
78+
### Related Topics
79+
[[Graph](../../tag/graph/README.md)]
80+
81+
### Hints
82+
<details>
83+
<summary>Hint 1</summary>
84+
Imagine if the courses are nodes of a graph. We need to build an array isReachable[i][j].
85+
</details>
86+
87+
<details>
88+
<summary>Hint 2</summary>
89+
Start a bfs from each course i and assign for each course j you visit isReachable[i][j] = True.
90+
</details>
91+
92+
<details>
93+
<summary>Hint 3</summary>
94+
Answer the queries from the isReachable array.
95+
</details>

problems/divide-array-in-sets-of-k-consecutive-numbers/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Return&nbsp;<code>True</code>&nbsp;if its possible<strong>&nbsp;</strong>otherwi
5454
<li><code>1 &lt;= nums[i] &lt;= 10^9</code></li>
5555
<li><code>1 &lt;= k &lt;= nums.length</code></li>
5656
</ul>
57+
<strong>Note:</strong> This question is the same as&nbsp;846:&nbsp;<a href="https://leetcode.com/problems/hand-of-straights/">https://leetcode.com/problems/hand-of-straights/</a>
5758

5859
### Related Topics
5960
[[Greedy](../../tag/greedy/README.md)]

0 commit comments

Comments
 (0)