You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,12 +62,22 @@ LeetCode Problems' Solutions
62
62
63
63
| # | Title | Solution | Difficulty |
64
64
| :-: | - | - | :-: |
65
+
| <spanid="1220">1220</span> |[Count Vowels Permutation](https://leetcode.com/problems/count-vowels-permutation"统计元音字母序列的数目")|[Go](https://github.com/openset/leetcode/tree/master/problems/count-vowels-permutation)| Hard |
66
+
| <spanid="1219">1219</span> |[Path with Maximum Gold](https://leetcode.com/problems/path-with-maximum-gold"黄金矿工")|[Go](https://github.com/openset/leetcode/tree/master/problems/path-with-maximum-gold)| Medium |
67
+
| <spanid="1218">1218</span> |[Longest Arithmetic Subsequence of Given Difference](https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference"最长定差子序列")|[Go](https://github.com/openset/leetcode/tree/master/problems/longest-arithmetic-subsequence-of-given-difference)| Medium |
68
+
| <spanid="1217">1217</span> |[Play with Chips](https://leetcode.com/problems/play-with-chips"玩筹码")|[Go](https://github.com/openset/leetcode/tree/master/problems/play-with-chips)| Easy |
69
+
| <spanid="1216">1216</span> |[Valid Palindrome III](https://leetcode.com/problems/valid-palindrome-iii"验证回文字符串 III") 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/valid-palindrome-iii)| Hard |
70
+
| <spanid="1215">1215</span> |[Stepping Numbers](https://leetcode.com/problems/stepping-numbers"步进数") 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/stepping-numbers)| Medium |
71
+
| <spanid="1214">1214</span> |[Two Sum BSTs](https://leetcode.com/problems/two-sum-bsts"查找两棵二叉搜索树之和") 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/two-sum-bsts)| Medium |
72
+
| <spanid="1213">1213</span> |[Intersection of Three Sorted Arrays](https://leetcode.com/problems/intersection-of-three-sorted-arrays"三个有序数组的交集") 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/intersection-of-three-sorted-arrays)| Easy |
73
+
| <spanid="1212">1212</span> |[Team Scores in Football Tournament](https://leetcode.com/problems/team-scores-in-football-tournament) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/team-scores-in-football-tournament)| Medium |
74
+
| <spanid="1211">1211</span> |[Queries Quality and Percentage](https://leetcode.com/problems/queries-quality-and-percentage) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/queries-quality-and-percentage)| Easy |
65
75
| <spanid="1210">1210</span> |[Minimum Moves to Reach Target with Rotations](https://leetcode.com/problems/minimum-moves-to-reach-target-with-rotations"穿过迷宫的最少移动次数")|[Go](https://github.com/openset/leetcode/tree/master/problems/minimum-moves-to-reach-target-with-rotations)| Hard |
66
76
| <spanid="1209">1209</span> |[Remove All Adjacent Duplicates in String II](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii"删除字符串中的所有相邻重复项 II")|[Go](https://github.com/openset/leetcode/tree/master/problems/remove-all-adjacent-duplicates-in-string-ii)| Medium |
67
77
| <spanid="1208">1208</span> |[Get Equal Substrings Within Budget](https://leetcode.com/problems/get-equal-substrings-within-budget"尽可能使字符串相等")|[Go](https://github.com/openset/leetcode/tree/master/problems/get-equal-substrings-within-budget)| Medium |
68
78
| <spanid="1207">1207</span> |[Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences"独一无二的出现次数")|[Go](https://github.com/openset/leetcode/tree/master/problems/unique-number-of-occurrences)| Easy |
69
-
| <spanid="1206">1206</span> |[Design Skiplist](https://leetcode.com/problems/design-skiplist)|[Go](https://github.com/openset/leetcode/tree/master/problems/design-skiplist)| Hard |
70
-
| <spanid="1205">1205</span> |[Monthly Transactions II](https://leetcode.com/problems/monthly-transactions-ii) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/monthly-transactions-ii)| Medium |
79
+
| <spanid="1206">1206</span> |[Design Skiplist](https://leetcode.com/problems/design-skiplist"设计跳表")|[Go](https://github.com/openset/leetcode/tree/master/problems/design-skiplist)| Hard |
80
+
| <spanid="1205">1205</span> |[Monthly Transactions II](https://leetcode.com/problems/monthly-transactions-ii"每月交易II") 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/monthly-transactions-ii)| Medium |
71
81
| <spanid="1204">1204</span> |[Last Person to Fit in the Elevator](https://leetcode.com/problems/last-person-to-fit-in-the-elevator) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/last-person-to-fit-in-the-elevator)| Medium |
72
82
| <spanid="1203">1203</span> |[Sort Items by Groups Respecting Dependencies](https://leetcode.com/problems/sort-items-by-groups-respecting-dependencies"项目管理")|[Go](https://github.com/openset/leetcode/tree/master/problems/sort-items-by-groups-respecting-dependencies)| Hard |
73
83
| <spanid="1202">1202</span> |[Smallest String With Swaps](https://leetcode.com/problems/smallest-string-with-swaps"交换字符串中的元素")|[Go](https://github.com/openset/leetcode/tree/master/problems/smallest-string-with-swaps)| Medium |
@@ -78,7 +88,7 @@ LeetCode Problems' Solutions
78
88
| <spanid="1197">1197</span> |[Minimum Knight Moves](https://leetcode.com/problems/minimum-knight-moves"进击的骑士") 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/minimum-knight-moves)| Medium |
79
89
| <spanid="1196">1196</span> |[How Many Apples Can You Put into the Basket](https://leetcode.com/problems/how-many-apples-can-you-put-into-the-basket"最多可以买到的苹果数量") 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/how-many-apples-can-you-put-into-the-basket)| Easy |
80
90
| <spanid="1195">1195</span> |[Fizz Buzz Multithreaded](https://leetcode.com/problems/fizz-buzz-multithreaded"交替打印字符串")|[Go](https://github.com/openset/leetcode/tree/master/problems/fizz-buzz-multithreaded)| Medium |
81
-
| <spanid="1194">1194</span> |[Tournament Winners](https://leetcode.com/problems/tournament-winners) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/tournament-winners)| Hard |
91
+
| <spanid="1194">1194</span> |[Tournament Winners](https://leetcode.com/problems/tournament-winners"锦标赛优胜者") 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/tournament-winners)| Hard |
82
92
| <spanid="1193">1193</span> |[Monthly Transactions I](https://leetcode.com/problems/monthly-transactions-i"每月交易 I") 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/monthly-transactions-i)| Medium |
83
93
| <spanid="1192">1192</span> |[Critical Connections in a Network](https://leetcode.com/problems/critical-connections-in-a-network"查找集群内的「关键连接」")|[Go](https://github.com/openset/leetcode/tree/master/problems/critical-connections-in-a-network)| Hard |
84
94
| <spanid="1191">1191</span> |[K-Concatenation Maximum Sum](https://leetcode.com/problems/k-concatenation-maximum-sum"K 次串联后最大子数组之和")|[Go](https://github.com/openset/leetcode/tree/master/problems/k-concatenation-maximum-sum)| Medium |
@@ -175,7 +185,7 @@ LeetCode Problems' Solutions
175
185
| <spanid="1100">1100</span> |[Find K-Length Substrings With No Repeated Characters](https://leetcode.com/problems/find-k-length-substrings-with-no-repeated-characters"长度为 K 的无重复字符子串") 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/find-k-length-substrings-with-no-repeated-characters)| Medium |
176
186
| <spanid="1099">1099</span> |[Two Sum Less Than K](https://leetcode.com/problems/two-sum-less-than-k"小于 K 的两数之和") 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/two-sum-less-than-k)| Easy |
177
187
| <spanid="1098">1098</span> |[Unpopular Books](https://leetcode.com/problems/unpopular-books"小众书籍") 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/unpopular-books)| Medium |
178
-
| <spanid="1097">1097</span> |[Game Play Analysis V](https://leetcode.com/problems/game-play-analysis-v) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/game-play-analysis-v)| Hard |
188
+
| <spanid="1097">1097</span> |[Game Play Analysis V](https://leetcode.com/problems/game-play-analysis-v"游戏玩法分析 V") 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/game-play-analysis-v)| Hard |
179
189
| <spanid="1096">1096</span> |[Brace Expansion II](https://leetcode.com/problems/brace-expansion-ii"花括号展开 II")|[Go](https://github.com/openset/leetcode/tree/master/problems/brace-expansion-ii)| Hard |
180
190
| <spanid="1095">1095</span> |[Find in Mountain Array](https://leetcode.com/problems/find-in-mountain-array"山脉数组中查找目标值")|[Go](https://github.com/openset/leetcode/tree/master/problems/find-in-mountain-array)| Hard |
181
191
| <spanid="1094">1094</span> |[Car Pooling](https://leetcode.com/problems/car-pooling"拼车")|[Go](https://github.com/openset/leetcode/tree/master/problems/car-pooling)| Medium |
<p>Given an integer <code>n</code>, your task is to count how many strings of length <code>n</code> can be formed under the following rules:</p>
15
+
16
+
<ul>
17
+
<li>Each character is a lower case vowel (<code>'a'</code>, <code>'e'</code>, <code>'i'</code>, <code>'o'</code>, <code>'u'</code>)</li>
18
+
<li>Each vowel <code>'a'</code> may only be followed by an <code>'e'</code>.</li>
19
+
<li>Each vowel <code>'e'</code> may only be followed by an <code>'a'</code> or an <code>'i'</code>.</li>
20
+
<li>Each vowel <code>'i'</code> <strong>may not</strong> be followed by another <code>'i'</code>.</li>
21
+
<li>Each vowel <code>'o'</code> may only be followed by an <code>'i'</code> or a <code>'u'</code>.</li>
22
+
<li>Each vowel <code>'u'</code> may only be followed by an <code>'a'.</code></li>
23
+
</ul>
24
+
25
+
<p>Since the answer may be too large, return it modulo <code>10^9 + 7.</code></p>
26
+
27
+
<p> </p>
28
+
<p><strong>Example 1:</strong></p>
29
+
30
+
<pre>
31
+
<strong>Input:</strong> n = 1
32
+
<strong>Output:</strong> 5
33
+
<strong>Explanation:</strong> All possible strings are: "a", "e", "i" , "o" and "u".
34
+
</pre>
35
+
36
+
<p><strong>Example 2:</strong></p>
37
+
38
+
<pre>
39
+
<strong>Input:</strong> n = 2
40
+
<strong>Output:</strong> 10
41
+
<strong>Explanation:</strong> All possible strings are: "ae", "ea", "ei", "ia", "ie", "io", "iu", "oi", "ou" and "ua".
42
+
</pre>
43
+
44
+
<p><strong>Example 3: </strong></p>
45
+
46
+
<pre>
47
+
<strong>Input:</strong> n = 5
48
+
<strong>Output:</strong> 68</pre>
49
+
50
+
<p> </p>
51
+
<p><strong>Constraints:</strong></p>
52
+
53
+
<ul>
54
+
<li><code>1 <= n <= 2 * 10^4</code></li>
55
+
</ul>
56
+
57
+
### Hints
58
+
<details>
59
+
<summary>Hint 1</summary>
60
+
Use dynamic programming.
61
+
</details>
62
+
63
+
<details>
64
+
<summary>Hint 2</summary>
65
+
Let dp[i][j] be the number of strings of length i that ends with the j-th vowel.
66
+
</details>
67
+
68
+
<details>
69
+
<summary>Hint 3</summary>
70
+
Deduce the recurrence from the given relations between vowels.
[< Previous](https://github.com/openset/leetcode/tree/master/problems/team-scores-in-football-tournament"Team Scores in Football Tournament")
9
+
10
+
[Next >](https://github.com/openset/leetcode/tree/master/problems/two-sum-bsts"Two Sum BSTs")
11
+
12
+
## [5079. Intersection of Three Sorted Arrays (Easy)](https://leetcode.com/problems/intersection-of-three-sorted-arrays"三个有序数组的交集")
13
+
14
+
<p>Given three integer arrays <code>arr1</code>, <code>arr2</code> and <code>arr3</code> <strong>sorted</strong> in <strong>strictly increasing</strong> order, return a sorted array of <strong>only</strong> the integers that appeared in <strong>all</strong> three arrays.</p>
[< Previous](https://github.com/openset/leetcode/tree/master/problems/play-with-chips"Play with Chips")
9
+
10
+
[Next >](https://github.com/openset/leetcode/tree/master/problems/path-with-maximum-gold"Path with Maximum Gold")
11
+
12
+
## [5214. Longest Arithmetic Subsequence of Given Difference (Medium)](https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference"最长定差子序列")
13
+
14
+
<p>Given an integer array <code>arr</code> and an integer <code><fontface="monospace">difference</font></code>, return the length of the longest arithmetic subsequence in <fontface="monospace"><code>arr</code> </font>such that the difference between adjacent elements in the subsequence equals <code>difference</code>.</p>
Copy file name to clipboardExpand all lines: problems/minimum-moves-to-reach-target-with-rotations/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
[< Previous](https://github.com/openset/leetcode/tree/master/problems/remove-all-adjacent-duplicates-in-string-ii"Remove All Adjacent Duplicates in String II")
9
9
10
-
Next >
10
+
[Next >](https://github.com/openset/leetcode/tree/master/problems/queries-quality-and-percentage"Queries Quality and Percentage")
11
11
12
12
## [5208. Minimum Moves to Reach Target with Rotations (Hard)](https://leetcode.com/problems/minimum-moves-to-reach-target-with-rotations"穿过迷宫的最少移动次数")
0 commit comments