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
+11-5
Original file line number
Diff line number
Diff line change
@@ -62,14 +62,20 @@ LeetCode Problems' Solutions
62
62
63
63
| # | Title | Solution | Difficulty |
64
64
| :-: | - | - | :-: |
65
+
| <spanid="1269">1269</span> |[Number of Ways to Stay in the Same Place After Some Steps](https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps"停在原地的方案数")|[Go](https://github.com/openset/leetcode/tree/master/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps)| Hard |
66
+
| <spanid="1268">1268</span> |[Search Suggestions System](https://leetcode.com/problems/search-suggestions-system"搜索推荐系统")|[Go](https://github.com/openset/leetcode/tree/master/problems/search-suggestions-system)| Medium |
67
+
| <spanid="1267">1267</span> |[Count Servers that Communicate](https://leetcode.com/problems/count-servers-that-communicate"统计参与通信的服务器")|[Go](https://github.com/openset/leetcode/tree/master/problems/count-servers-that-communicate)| Medium |
68
+
| <spanid="1266">1266</span> |[Minimum Time Visiting All Points](https://leetcode.com/problems/minimum-time-visiting-all-points"访问所有点的最小时间")|[Go](https://github.com/openset/leetcode/tree/master/problems/minimum-time-visiting-all-points)| Easy |
69
+
| <spanid="1265">1265</span> |[Print Immutable Linked List in Reverse](https://leetcode.com/problems/print-immutable-linked-list-in-reverse) 🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/print-immutable-linked-list-in-reverse)| Medium |
70
+
| <spanid="1264">1264</span> |[Page Recommendations](https://leetcode.com/problems/page-recommendations) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/page-recommendations)| Medium |
65
71
| <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](https://github.com/openset/leetcode/tree/master/problems/minimum-moves-to-move-a-box-to-their-target-location)| Hard |
66
72
| <spanid="1262">1262</span> |[Greatest Sum Divisible by Three](https://leetcode.com/problems/greatest-sum-divisible-by-three"可被三整除的最大和")|[Go](https://github.com/openset/leetcode/tree/master/problems/greatest-sum-divisible-by-three)| Medium |
67
73
| <spanid="1261">1261</span> |[Find Elements in a Contaminated Binary Tree](https://leetcode.com/problems/find-elements-in-a-contaminated-binary-tree"在受污染的二叉树中查找元素")|[Go](https://github.com/openset/leetcode/tree/master/problems/find-elements-in-a-contaminated-binary-tree)| Medium |
| <spanid="1259">1259</span> |[Handshakes That Don't Cross](https://leetcode.com/problems/handshakes-that-dont-cross"不相交的握手")|[Go](https://github.com/openset/leetcode/tree/master/problems/handshakes-that-dont-cross)| Hard |
70
-
| <spanid="1258">1258</span> |[Synonymous Sentences](https://leetcode.com/problems/synonymous-sentences"近义词句子")|[Go](https://github.com/openset/leetcode/tree/master/problems/synonymous-sentences)| Medium |
71
-
| <spanid="1257">1257</span> |[Smallest Common Region](https://leetcode.com/problems/smallest-common-region"最小公共区域")|[Go](https://github.com/openset/leetcode/tree/master/problems/smallest-common-region)| Medium |
72
-
| <spanid="1256">1256</span> |[Encode Number](https://leetcode.com/problems/encode-number"加密数字")|[Go](https://github.com/openset/leetcode/tree/master/problems/encode-number)| Medium |
75
+
| <spanid="1259">1259</span> |[Handshakes That Don't Cross](https://leetcode.com/problems/handshakes-that-dont-cross"不相交的握手")🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/handshakes-that-dont-cross)| Hard |
76
+
| <spanid="1258">1258</span> |[Synonymous Sentences](https://leetcode.com/problems/synonymous-sentences"近义词句子")🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/synonymous-sentences)| Medium |
77
+
| <spanid="1257">1257</span> |[Smallest Common Region](https://leetcode.com/problems/smallest-common-region"最小公共区域")🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/smallest-common-region)| Medium |
78
+
| <spanid="1256">1256</span> |[Encode Number](https://leetcode.com/problems/encode-number"加密数字")🔒 |[Go](https://github.com/openset/leetcode/tree/master/problems/encode-number)| Medium |
73
79
| <spanid="1255">1255</span> |[Maximum Score Words Formed by Letters](https://leetcode.com/problems/maximum-score-words-formed-by-letters"得分最高的单词集合")|[Go](https://github.com/openset/leetcode/tree/master/problems/maximum-score-words-formed-by-letters)| Hard |
74
80
| <spanid="1254">1254</span> |[Number of Closed Islands](https://leetcode.com/problems/number-of-closed-islands"统计封闭岛屿的数目")|[Go](https://github.com/openset/leetcode/tree/master/problems/number-of-closed-islands)| Medium |
75
81
| <spanid="1253">1253</span> |[Reconstruct a 2-Row Binary Matrix](https://leetcode.com/problems/reconstruct-a-2-row-binary-matrix"重构 2 行二进制矩阵")|[Go](https://github.com/openset/leetcode/tree/master/problems/reconstruct-a-2-row-binary-matrix)| Medium |
@@ -183,7 +189,7 @@ LeetCode Problems' Solutions
183
189
| <spanid="1145">1145</span> |[Binary Tree Coloring Game](https://leetcode.com/problems/binary-tree-coloring-game"二叉树着色游戏")|[Go](https://github.com/openset/leetcode/tree/master/problems/binary-tree-coloring-game)| Medium |
184
190
| <spanid="1144">1144</span> |[Decrease Elements To Make Array Zigzag](https://leetcode.com/problems/decrease-elements-to-make-array-zigzag"递减元素使数组呈锯齿状")|[Go](https://github.com/openset/leetcode/tree/master/problems/decrease-elements-to-make-array-zigzag)| Medium |
185
191
| <spanid="1143">1143</span> |[Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence"最长公共子序列")|[Go](https://github.com/openset/leetcode/tree/master/problems/longest-common-subsequence)| Medium |
186
-
| <spanid="1142">1142</span> |[User Activity for the Past 30 Days II](https://leetcode.com/problems/user-activity-for-the-past-30-days-ii) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/user-activity-for-the-past-30-days-ii)| Easy |
192
+
| <spanid="1142">1142</span> |[User Activity for the Past 30 Days II](https://leetcode.com/problems/user-activity-for-the-past-30-days-ii"过去30天的用户活动 II") 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/user-activity-for-the-past-30-days-ii)| Easy |
187
193
| <spanid="1141">1141</span> |[User Activity for the Past 30 Days I](https://leetcode.com/problems/user-activity-for-the-past-30-days-i) 🔒 |[MySQL](https://github.com/openset/leetcode/tree/master/problems/user-activity-for-the-past-30-days-i)| Easy |
188
194
| <spanid="1140">1140</span> |[Stone Game II](https://leetcode.com/problems/stone-game-ii"石子游戏 II")|[Go](https://github.com/openset/leetcode/tree/master/problems/stone-game-ii)| Medium |
189
195
| <spanid="1139">1139</span> |[Largest 1-Bordered Square](https://leetcode.com/problems/largest-1-bordered-square"最大的以 1 为边界的正方形")|[Go](https://github.com/openset/leetcode/tree/master/problems/largest-1-bordered-square)| Medium |
## [1267. Count Servers that Communicate (Medium)](https://leetcode.com/problems/count-servers-that-communicate"统计参与通信的服务器")
13
+
14
+
<p>You are given a map of a server center, represented as a <code>m * n</code> integer matrix <code>grid</code>, where 1 means that on that cell there is a server and 0 means that it is no server. Two servers are said to communicate if they are on the same row or on the same column.<br />
15
+
<br />
16
+
Return the number of servers that communicate with any other server.</p>
<b>Explanation:</b> The two servers in the first row can communicate with each other. The two servers in the third column can communicate with each other. The server at right bottom corner can't communicate with any other server.
[Next >](https://github.com/openset/leetcode/tree/master/problems/insert-into-a-cyclic-sorted-list"Insert into a Cyclic Sorted List")
10
+
[Next >](https://github.com/openset/leetcode/tree/master/problems/insert-into-a-sorted-circular-linked-list"Insert into a Sorted Circular Linked List")
11
11
12
12
## [707. Design Linked List (Medium)](https://leetcode.com/problems/design-linked-list"设计链表")
1.[Insert into a Cyclic Sorted List](https://github.com/openset/leetcode/tree/master/problems/insert-into-a-cyclic-sorted-list) (Medium)
56
+
1.[Insert into a Sorted Circular Linked List](https://github.com/openset/leetcode/tree/master/problems/insert-into-a-sorted-circular-linked-list) (Medium)
<p>Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is <b>not printed in the last 10 seconds</b>.</p>
14
15
16
+
<p>Given a message and a timestamp (in seconds granularity), return true if the message should be printed in the given timestamp, otherwise returns false.</p>
17
+
18
+
<p>It is possible that several messages arrive roughly at the same time.</p>
## [1263. Minimum Moves to Move a Box to Their Target Location (Hard)](https://leetcode.com/problems/minimum-moves-to-move-a-box-to-their-target-location"推箱子")
13
13
14
-
<p>Storekeeper is a game, in which the player pushes boxes around in a warehouse, trying to get them to target locations.</p>
14
+
<p>Storekeeper is a game in which the player pushes boxes around in a warehouse trying to get them to target locations.</p>
15
15
16
-
<p>The game is represented by a <code>grid</code> of size <code>n<fontface="sans-serif, Arial, Verdana, Trebuchet MS">*</font></code><code>m</code>, where each element is a wall, floor or a box.</p>
16
+
<p>The game is represented by a <code>grid</code> of size <code>n<fontface="sans-serif, Arial, Verdana, Trebuchet MS">*</font></code><code>m</code>, where each element is a wall, floor, or a box.</p>
17
17
18
18
<p>Your task is move the box <code>'B'</code> to the target position <code>'T'</code> under the following rules:</p>
19
19
20
20
<ul>
21
-
<li>Player is represented by character <code>'S'</code> and can move up, down, left, right in the <code>grid</code> if its a floor (empy cell).</li>
21
+
<li>Player is represented by character <code>'S'</code> and can move up, down, left, right in the <code>grid</code> if it is a floor (empy cell).</li>
22
22
<li>Floor is represented by character <code>'.'</code> that means free cell to walk.</li>
23
23
<li>Wall is represented by character <code>'#'</code> that means obstacle (impossible to walk there). </li>
24
24
<li>There is only one box <code>'B'</code> and one target cell <code>'T'</code> in the <code>grid</code>.</li>
[< Previous](https://github.com/openset/leetcode/tree/master/problems/print-immutable-linked-list-in-reverse"Print Immutable Linked List in Reverse")
9
+
10
+
[Next >](https://github.com/openset/leetcode/tree/master/problems/count-servers-that-communicate"Count Servers that Communicate")
11
+
12
+
## [1266. Minimum Time Visiting All Points (Easy)](https://leetcode.com/problems/minimum-time-visiting-all-points"访问所有点的最小时间")
13
+
14
+
<p>On a plane there are <code>n</code> points with integer coordinates <code>points[i] = [xi, yi]</code>. Your task is to find the minimum time in seconds to visit all points.</p>
15
+
16
+
<p>You can move according to the next rules:</p>
17
+
18
+
<ul>
19
+
<li>In one second always you can either move vertically, horizontally by one unit or diagonally (it means to move one unit vertically and one unit horizontally in one second).</li>
20
+
<li>You have to visit the points in the same order as they appear in the array.</li>
0 commit comments