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
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,14 @@ LeetCode Problems' Solutions
62
62
63
63
| # | Title | Solution | Difficulty |
64
64
| :-: | - | - | :-: |
65
+
| <spanid="1320">1320</span> |[Minimum Distance to Type a Word Using Two Fingers](https://leetcode.com/problems/minimum-distance-to-type-a-word-using-two-fingers"二指输入的的最小距离")|[Go](problems/minimum-distance-to-type-a-word-using-two-fingers)| Hard |
66
+
| <spanid="1319">1319</span> |[Number of Operations to Make Network Connected](https://leetcode.com/problems/number-of-operations-to-make-network-connected"连通网络的操作次数")|[Go](problems/number-of-operations-to-make-network-connected)| Medium |
67
+
| <spanid="1318">1318</span> |[Minimum Flips to Make a OR b Equal to c](https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c"或运算的最小翻转次数")|[Go](problems/minimum-flips-to-make-a-or-b-equal-to-c)| Medium |
68
+
| <spanid="1317">1317</span> |[Convert Integer to the Sum of Two No-Zero Integers](https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers"将整数转换为两个无零整数的和")|[Go](problems/convert-integer-to-the-sum-of-two-no-zero-integers)| Easy |
69
+
| <spanid="1316">1316</span> |[Distinct Echo Substrings](https://leetcode.com/problems/distinct-echo-substrings"不同的循环子字符串")|[Go](problems/distinct-echo-substrings)| Hard |
70
+
| <spanid="1315">1315</span> |[Sum of Nodes with Even-Valued Grandparent](https://leetcode.com/problems/sum-of-nodes-with-even-valued-grandparent"祖父节点值为偶数的节点和")|[Go](problems/sum-of-nodes-with-even-valued-grandparent)| Medium |
71
+
| <spanid="1314">1314</span> |[Matrix Block Sum](https://leetcode.com/problems/matrix-block-sum"矩阵区域和")|[Go](problems/matrix-block-sum)| Medium |
| <spanid="1312">1312</span> |[Minimum Insertion Steps to Make a String Palindrome](https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome"让字符串成为回文串的最少插入次数")|[Go](problems/minimum-insertion-steps-to-make-a-string-palindrome)| Hard |
66
74
| <spanid="1311">1311</span> |[Get Watched Videos by Your Friends](https://leetcode.com/problems/get-watched-videos-by-your-friends"获取你好友已观看的视频")|[Go](problems/get-watched-videos-by-your-friends)| Medium |
67
75
| <spanid="1310">1310</span> |[XOR Queries of a Subarray](https://leetcode.com/problems/xor-queries-of-a-subarray"子数组异或查询")|[Go](problems/xor-queries-of-a-subarray)| Medium |
@@ -95,7 +103,7 @@ LeetCode Problems' Solutions
95
103
| <spanid="1282">1282</span> |[Group the People Given the Group Size They Belong To](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to"用户分组")|[Go](problems/group-the-people-given-the-group-size-they-belong-to)| Medium |
96
104
| <spanid="1281">1281</span> |[Subtract the Product and Sum of Digits of an Integer](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer"整数的各位积和之差")|[Go](problems/subtract-the-product-and-sum-of-digits-of-an-integer)| Easy |
97
105
| <spanid="1280">1280</span> |[Students and Examinations](https://leetcode.com/problems/students-and-examinations"学生们参加各科测试的次数") 🔒 |[MySQL](problems/students-and-examinations)| Easy |
| <spanid="1278">1278</span> |[Palindrome Partitioning III](https://leetcode.com/problems/palindrome-partitioning-iii"分割回文串 III")|[Go](problems/palindrome-partitioning-iii)| Hard |
100
108
| <spanid="1277">1277</span> |[Count Square Submatrices with All Ones](https://leetcode.com/problems/count-square-submatrices-with-all-ones"统计全为 1 的正方形子矩阵")|[Go](problems/count-square-submatrices-with-all-ones)| Medium |
101
109
| <spanid="1276">1276</span> |[Number of Burgers with No Waste of Ingredients](https://leetcode.com/problems/number-of-burgers-with-no-waste-of-ingredients"不浪费原料的汉堡制作方案")|[Go](problems/number-of-burgers-with-no-waste-of-ingredients)| Medium |
@@ -110,7 +118,7 @@ LeetCode Problems' Solutions
110
118
| <spanid="1267">1267</span> |[Count Servers that Communicate](https://leetcode.com/problems/count-servers-that-communicate"统计参与通信的服务器")|[Go](problems/count-servers-that-communicate)| Medium |
111
119
| <spanid="1266">1266</span> |[Minimum Time Visiting All Points](https://leetcode.com/problems/minimum-time-visiting-all-points"访问所有点的最小时间")|[Go](problems/minimum-time-visiting-all-points)| Easy |
112
120
| <spanid="1265">1265</span> |[Print Immutable Linked List in Reverse](https://leetcode.com/problems/print-immutable-linked-list-in-reverse"逆序打印不可变链表") 🔒 |[Go](problems/print-immutable-linked-list-in-reverse)| Medium |
113
-
| <spanid="1264">1264</span> |[Page Recommendations](https://leetcode.com/problems/page-recommendations) 🔒 |[MySQL](problems/page-recommendations)| Medium |
121
+
| <spanid="1264">1264</span> |[Page Recommendations](https://leetcode.com/problems/page-recommendations"页面推荐") 🔒 |[MySQL](problems/page-recommendations)| Medium |
114
122
| <spanid="1263">1263</span> |[Minimum Moves to Move a Box to Their Target Location](https://leetcode.com/problems/minimum-moves-to-move-a-box-to-their-target-location"推箱子")|[Go](problems/minimum-moves-to-move-a-box-to-their-target-location)| Hard |
115
123
| <spanid="1262">1262</span> |[Greatest Sum Divisible by Three](https://leetcode.com/problems/greatest-sum-divisible-by-three"可被三整除的最大和")|[Go](problems/greatest-sum-divisible-by-three)| Medium |
116
124
| <spanid="1261">1261</span> |[Find Elements in a Contaminated Binary Tree](https://leetcode.com/problems/find-elements-in-a-contaminated-binary-tree"在受污染的二叉树中查找元素")|[Go](problems/find-elements-in-a-contaminated-binary-tree)| Medium |
@@ -123,7 +131,7 @@ LeetCode Problems' Solutions
123
131
| <spanid="1254">1254</span> |[Number of Closed Islands](https://leetcode.com/problems/number-of-closed-islands"统计封闭岛屿的数目")|[Go](problems/number-of-closed-islands)| Medium |
124
132
| <spanid="1253">1253</span> |[Reconstruct a 2-Row Binary Matrix](https://leetcode.com/problems/reconstruct-a-2-row-binary-matrix"重构 2 行二进制矩阵")|[Go](problems/reconstruct-a-2-row-binary-matrix)| Medium |
125
133
| <spanid="1252">1252</span> |[Cells with Odd Values in a Matrix](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix"奇数值单元格的数目")|[Go](problems/cells-with-odd-values-in-a-matrix)| Easy |
| <spanid="1250">1250</span> |[Check If It Is a Good Array](https://leetcode.com/problems/check-if-it-is-a-good-array"检查「好数组」")|[Go](problems/check-if-it-is-a-good-array)| Hard |
128
136
| <spanid="1249">1249</span> |[Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses"移除无效的括号")|[Go](problems/minimum-remove-to-make-valid-parentheses)| Medium |
129
137
| <spanid="1248">1248</span> |[Count Number of Nice Subarrays](https://leetcode.com/problems/count-number-of-nice-subarrays"统计「优美子数组」")|[Go](problems/count-number-of-nice-subarrays)| Medium |
@@ -162,7 +170,7 @@ LeetCode Problems' Solutions
162
170
| <spanid="1215">1215</span> |[Stepping Numbers](https://leetcode.com/problems/stepping-numbers"步进数") 🔒 |[Go](problems/stepping-numbers)| Medium |
163
171
| <spanid="1214">1214</span> |[Two Sum BSTs](https://leetcode.com/problems/two-sum-bsts"查找两棵二叉搜索树之和") 🔒 |[Go](problems/two-sum-bsts)| Medium |
164
172
| <spanid="1213">1213</span> |[Intersection of Three Sorted Arrays](https://leetcode.com/problems/intersection-of-three-sorted-arrays"三个有序数组的交集") 🔒 |[Go](problems/intersection-of-three-sorted-arrays)| Easy |
165
-
| <spanid="1212">1212</span> |[Team Scores in Football Tournament](https://leetcode.com/problems/team-scores-in-football-tournament) 🔒 |[MySQL](problems/team-scores-in-football-tournament)| Medium |
173
+
| <spanid="1212">1212</span> |[Team Scores in Football Tournament](https://leetcode.com/problems/team-scores-in-football-tournament"查询球队积分") 🔒 |[MySQL](problems/team-scores-in-football-tournament)| Medium |
166
174
| <spanid="1211">1211</span> |[Queries Quality and Percentage](https://leetcode.com/problems/queries-quality-and-percentage) 🔒 |[MySQL](problems/queries-quality-and-percentage)| Easy |
167
175
| <spanid="1210">1210</span> |[Minimum Moves to Reach Target with Rotations](https://leetcode.com/problems/minimum-moves-to-reach-target-with-rotations"穿过迷宫的最少移动次数")|[Go](problems/minimum-moves-to-reach-target-with-rotations)| Hard |
168
176
| <spanid="1209">1209</span> |[Remove All Adjacent Duplicates in String II](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii"删除字符串中的所有相邻重复项 II")|[Go](problems/remove-all-adjacent-duplicates-in-string-ii)| Medium |
| <spanid="1164">1164</span> |[Product Price at a Given Date](https://leetcode.com/problems/product-price-at-a-given-date) 🔒 |[MySQL](problems/product-price-at-a-given-date)| Medium |
221
+
| <spanid="1164">1164</span> |[Product Price at a Given Date](https://leetcode.com/problems/product-price-at-a-given-date"指定日期的产品价格") 🔒 |[MySQL](problems/product-price-at-a-given-date)| Medium |
214
222
| <spanid="1163">1163</span> |[Last Substring in Lexicographical Order](https://leetcode.com/problems/last-substring-in-lexicographical-order"按字典序排在最后的子串")|[Go](problems/last-substring-in-lexicographical-order)| Hard |
215
223
| <spanid="1162">1162</span> |[As Far from Land as Possible](https://leetcode.com/problems/as-far-from-land-as-possible"地图分析")|[Go](problems/as-far-from-land-as-possible)| Medium |
216
224
| <spanid="1161">1161</span> |[Maximum Level Sum of a Binary Tree](https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree"最大层内元素和")|[Go](problems/maximum-level-sum-of-a-binary-tree)| Medium |
217
225
| <spanid="1160">1160</span> |[Find Words That Can Be Formed by Characters](https://leetcode.com/problems/find-words-that-can-be-formed-by-characters"拼写单词")|[Go](problems/find-words-that-can-be-formed-by-characters)| Easy |
218
226
| <spanid="1159">1159</span> |[Market Analysis II](https://leetcode.com/problems/market-analysis-ii) 🔒 |[MySQL](problems/market-analysis-ii)| Hard |
219
-
| <spanid="1158">1158</span> |[Market Analysis I](https://leetcode.com/problems/market-analysis-i) 🔒 |[MySQL](problems/market-analysis-i)| Medium |
227
+
| <spanid="1158">1158</span> |[Market Analysis I](https://leetcode.com/problems/market-analysis-i"市场分析 I") 🔒 |[MySQL](problems/market-analysis-i)| Medium |
220
228
| <spanid="1157">1157</span> |[Online Majority Element In Subarray](https://leetcode.com/problems/online-majority-element-in-subarray"子数组中占绝大多数的元素")|[Go](problems/online-majority-element-in-subarray)| Hard |
221
229
| <spanid="1156">1156</span> |[Swap For Longest Repeated Character Substring](https://leetcode.com/problems/swap-for-longest-repeated-character-substring"单字符重复子串的最大长度")|[Go](problems/swap-for-longest-repeated-character-substring)| Medium |
222
230
| <spanid="1155">1155</span> |[Number of Dice Rolls With Target Sum](https://leetcode.com/problems/number-of-dice-rolls-with-target-sum"掷骰子的N种方法")|[Go](problems/number-of-dice-rolls-with-target-sum)| Medium |
@@ -247,7 +255,7 @@ LeetCode Problems' Solutions
247
255
| <spanid="1130">1130</span> |[Minimum Cost Tree From Leaf Values](https://leetcode.com/problems/minimum-cost-tree-from-leaf-values"叶值的最小代价生成树")|[Go](problems/minimum-cost-tree-from-leaf-values)| Medium |
248
256
| <spanid="1129">1129</span> |[Shortest Path with Alternating Colors](https://leetcode.com/problems/shortest-path-with-alternating-colors"颜色交替的最短路径")|[Go](problems/shortest-path-with-alternating-colors)| Medium |
249
257
| <spanid="1128">1128</span> |[Number of Equivalent Domino Pairs](https://leetcode.com/problems/number-of-equivalent-domino-pairs"等价多米诺骨牌对的数量")|[Go](problems/number-of-equivalent-domino-pairs)| Easy |
250
-
| <spanid="1127">1127</span> |[User Purchase Platform](https://leetcode.com/problems/user-purchase-platform) 🔒 |[MySQL](problems/user-purchase-platform)| Hard |
258
+
| <spanid="1127">1127</span> |[User Purchase Platform](https://leetcode.com/problems/user-purchase-platform"用户购买平台") 🔒 |[MySQL](problems/user-purchase-platform)| Hard |
251
259
| <spanid="1126">1126</span> |[Active Businesses](https://leetcode.com/problems/active-businesses"查询活跃业务") 🔒 |[MySQL](problems/active-businesses)| Medium |
252
260
| <spanid="1125">1125</span> |[Smallest Sufficient Team](https://leetcode.com/problems/smallest-sufficient-team"最小的必要团队")|[Go](problems/smallest-sufficient-team)| Hard |
253
261
| <spanid="1124">1124</span> |[Longest Well-Performing Interval](https://leetcode.com/problems/longest-well-performing-interval"表现良好的最长时间段")|[Go](problems/longest-well-performing-interval)| Medium |
[Next >](../minimum-flips-to-make-a-or-b-equal-to-c"Minimum Flips to Make a OR b Equal to c")
11
+
12
+
## [1317. Convert Integer to the Sum of Two No-Zero Integers (Easy)](https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers"将整数转换为两个无零整数的和")
13
+
14
+
<p>Given an integer <code>n</code>. No-Zero integer is a positive integer which <strong>doesn't contain any 0</strong> in its decimal representation.</p>
15
+
16
+
<p>Return <em>a list of two integers</em> <code>[A, B]</code> where:</p>
17
+
18
+
<ul>
19
+
<li><code>A</code> and <code>B</code> are No-Zero integers.</li>
20
+
<li><code>A + B = n</code></li>
21
+
</ul>
22
+
23
+
<p>It's guarateed that there is at least one valid solution. If there are many valid solutions you can return any of them.</p>
24
+
25
+
<p> </p>
26
+
<p><strong>Example 1:</strong></p>
27
+
28
+
<pre>
29
+
<strong>Input:</strong> n = 2
30
+
<strong>Output:</strong> [1,1]
31
+
<strong>Explanation:</strong> A = 1, B = 1. A + B = n and both A and B don't contain any 0 in their decimal representation.
32
+
</pre>
33
+
34
+
<p><strong>Example 2:</strong></p>
35
+
36
+
<pre>
37
+
<strong>Input:</strong> n = 11
38
+
<strong>Output:</strong> [2,9]
39
+
</pre>
40
+
41
+
<p><strong>Example 3:</strong></p>
42
+
43
+
<pre>
44
+
<strong>Input:</strong> n = 10000
45
+
<strong>Output:</strong> [1,9999]
46
+
</pre>
47
+
48
+
<p><strong>Example 4:</strong></p>
49
+
50
+
<pre>
51
+
<strong>Input:</strong> n = 69
52
+
<strong>Output:</strong> [1,68]
53
+
</pre>
54
+
55
+
<p><strong>Example 5:</strong></p>
56
+
57
+
<pre>
58
+
<strong>Input:</strong> n = 1010
59
+
<strong>Output:</strong> [11,999]
60
+
</pre>
61
+
62
+
<p> </p>
63
+
<p><strong>Constraints:</strong></p>
64
+
65
+
<ul>
66
+
<li><code>2 <= n <= 10^4</code></li>
67
+
</ul>
68
+
69
+
### Related Topics
70
+
[[Math](../../tag/math/README.md)]
71
+
72
+
### Hints
73
+
<details>
74
+
<summary>Hint 1</summary>
75
+
Loop through all elements from 1 to n.
76
+
</details>
77
+
78
+
<details>
79
+
<summary>Hint 2</summary>
80
+
Choose A = i and B = n - i then check if A and B are both No-Zero integers.
[< Previous](../minimum-insertion-steps-to-make-a-string-palindrome"Minimum Insertion Steps to Make a String Palindrome")
9
+
10
+
[Next >](../matrix-block-sum"Matrix Block Sum")
11
+
12
+
## [1313. Decompress Run-Length Encoded List (Easy)](https://leetcode.com/problems/decompress-run-length-encoded-list"解压缩编码列表")
13
+
14
+
<p>We are given a list <code>nums</code> of integers representing a list compressed with run-length encoding.</p>
15
+
16
+
<p>Consider each adjacent pair of elements <code>[a, b] = [nums[2*i], nums[2*i+1]]</code> (with <code>i >= 0</code>). For each such pair, there are <code>a</code> elements with value <code>b</code> in the decompressed list.</p>
0 commit comments