Skip to content

Commit 9d22018

Browse files
author
openset
committed
Add: new
1 parent e677d63 commit 9d22018

File tree

19 files changed

+330
-10
lines changed

19 files changed

+330
-10
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ LeetCode Problems' Solutions
6262

6363
| # | Title | Solution | Difficulty |
6464
| :-: | - | - | :-: |
65+
| <span id="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 |
66+
| <span id="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 |
67+
| <span id="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 |
68+
| <span id="1252">1252</span> | [Cells with Odd Values in a Matrix](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix "奇数值单元格的数目") | [Go](https://github.com/openset/leetcode/tree/master/problems/cells-with-odd-values-in-a-matrix) | Easy |
69+
| <span id="1251">1251</span> | [Average Selling Price](https://leetcode.com/problems/average-selling-price) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/average-selling-price) | Easy |
6570
| <span id="1250">1250</span> | [Check If It Is a Good Array](https://leetcode.com/problems/check-if-it-is-a-good-array "检查「好数组」") | [Go](https://github.com/openset/leetcode/tree/master/problems/check-if-it-is-a-good-array) | Hard |
6671
| <span id="1249">1249</span> | [Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses "移除无效的括号") | [Go](https://github.com/openset/leetcode/tree/master/problems/minimum-remove-to-make-valid-parentheses) | Medium |
6772
| <span id="1248">1248</span> | [Count Number of Nice Subarrays](https://leetcode.com/problems/count-number-of-nice-subarrays "统计「优美子数组」") | [Go](https://github.com/openset/leetcode/tree/master/problems/count-number-of-nice-subarrays) | Medium |
@@ -70,7 +75,7 @@ LeetCode Problems' Solutions
7075
| <span id="1245">1245</span> | [Tree Diameter](https://leetcode.com/problems/tree-diameter "树的直径") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/tree-diameter) | Medium |
7176
| <span id="1244">1244</span> | [Design A Leaderboard](https://leetcode.com/problems/design-a-leaderboard "力扣排行榜") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/design-a-leaderboard) | Medium |
7277
| <span id="1243">1243</span> | [Array Transformation](https://leetcode.com/problems/array-transformation "数组变换") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/array-transformation) | Easy |
73-
| <span id="1242">1242</span> | [Web Crawler Multithreaded](https://leetcode.com/problems/web-crawler-multithreaded) 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/web-crawler-multithreaded) | Medium |
78+
| <span id="1242">1242</span> | [Web Crawler Multithreaded](https://leetcode.com/problems/web-crawler-multithreaded "多线程网页爬虫") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/web-crawler-multithreaded) | Medium |
7479
| <span id="1241">1241</span> | [Number of Comments per Post](https://leetcode.com/problems/number-of-comments-per-post "每个帖子的评论数") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/number-of-comments-per-post) | Easy |
7580
| <span id="1240">1240</span> | [Tiling a Rectangle with the Fewest Squares](https://leetcode.com/problems/tiling-a-rectangle-with-the-fewest-squares "铺瓷砖") | [Go](https://github.com/openset/leetcode/tree/master/problems/tiling-a-rectangle-with-the-fewest-squares) | Hard |
7681
| <span id="1239">1239</span> | [Maximum Length of a Concatenated String with Unique Characters](https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters "串联字符串的最大长度") | [Go](https://github.com/openset/leetcode/tree/master/problems/maximum-length-of-a-concatenated-string-with-unique-characters) | Medium |
@@ -200,7 +205,7 @@ LeetCode Problems' Solutions
200205
| <span id="1115">1115</span> | [Print FooBar Alternately](https://leetcode.com/problems/print-foobar-alternately "交替打印FooBar") | [Go](https://github.com/openset/leetcode/tree/master/problems/print-foobar-alternately) | Medium |
201206
| <span id="1114">1114</span> | [Print in Order](https://leetcode.com/problems/print-in-order "按序打印") | [Go](https://github.com/openset/leetcode/tree/master/problems/print-in-order) | Easy |
202207
| <span id="1113">1113</span> | [Reported Posts](https://leetcode.com/problems/reported-posts) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/reported-posts) | Easy |
203-
| <span id="1112">1112</span> | [Highest Grade For Each Student](https://leetcode.com/problems/highest-grade-for-each-student) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/highest-grade-for-each-student) | Medium |
208+
| <span id="1112">1112</span> | [Highest Grade For Each Student](https://leetcode.com/problems/highest-grade-for-each-student "每位学生的最高成绩") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/highest-grade-for-each-student) | Medium |
204209
| <span id="1111">1111</span> | [Maximum Nesting Depth of Two Valid Parentheses Strings](https://leetcode.com/problems/maximum-nesting-depth-of-two-valid-parentheses-strings "有效括号的嵌套深度") | [Go](https://github.com/openset/leetcode/tree/master/problems/maximum-nesting-depth-of-two-valid-parentheses-strings) | Medium |
205210
| <span id="1110">1110</span> | [Delete Nodes And Return Forest](https://leetcode.com/problems/delete-nodes-and-return-forest "删点成林") | [Go](https://github.com/openset/leetcode/tree/master/problems/delete-nodes-and-return-forest) | Medium |
206211
| <span id="1109">1109</span> | [Corporate Flight Bookings](https://leetcode.com/problems/corporate-flight-bookings "航班预订统计") | [Go](https://github.com/openset/leetcode/tree/master/problems/corporate-flight-bookings) | Medium |
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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](https://github.com/openset/leetcode/tree/master/problems/check-if-it-is-a-good-array "Check If It Is a Good Array")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/cells-with-odd-values-in-a-matrix "Cells with Odd Values in a Matrix")
11+
12+
## [1251. Average Selling Price (Easy)](https://leetcode.com/problems/average-selling-price "")
13+
14+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Create table If Not Exists Prices (product_id int, start_date date, end_date date, price int);
2+
Create table If Not Exists UnitsSold (product_id int, purchase_date date, units int);
3+
Truncate table Prices;
4+
insert into Prices (product_id, start_date, end_date, price) values ('1', '2019-02-17', '2019-02-28', '5');
5+
insert into Prices (product_id, start_date, end_date, price) values ('1', '2019-03-01', '2019-03-22', '20');
6+
insert into Prices (product_id, start_date, end_date, price) values ('2', '2019-02-01', '2019-02-20', '15');
7+
insert into Prices (product_id, start_date, end_date, price) values ('2', '2019-02-21', '2019-03-31', '30');
8+
Truncate table UnitsSold;
9+
insert into UnitsSold (product_id, purchase_date, units) values ('1', '2019-02-25', '100');
10+
insert into UnitsSold (product_id, purchase_date, units) values ('1', '2019-03-01', '15');
11+
insert into UnitsSold (product_id, purchase_date, units) values ('2', '2019-02-10', '200');
12+
insert into UnitsSold (product_id, purchase_date, units) values ('2', '2019-03-22', '30');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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](https://github.com/openset/leetcode/tree/master/problems/average-selling-price "Average Selling Price")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/reconstruct-a-2-row-binary-matrix "Reconstruct a 2-Row Binary Matrix")
11+
12+
## [1252. Cells with Odd Values in a Matrix (Easy)](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix "奇数值单元格的数目")
13+
14+
<p>Given&nbsp;<code>n</code>&nbsp;and&nbsp;<code>m</code>&nbsp;which are the dimensions of a matrix initialized by zeros and given an array <code>indices</code>&nbsp;where <code>indices[i] = [ri, ci]</code>. For each pair of <code>[ri, ci]</code>&nbsp;you have to increment all cells in row <code>ri</code> and column <code>ci</code>&nbsp;by 1.</p>
15+
16+
<p>Return <em>the number of cells with odd values</em> in the matrix after applying the increment to all <code>indices</code>.</p>
17+
18+
<p>&nbsp;</p>
19+
<p><strong>Example 1:</strong></p>
20+
<img alt="" src="https://assets.leetcode.com/uploads/2019/10/30/e1.png" style="width: 600px; height: 118px;" />
21+
<pre>
22+
<strong>Input:</strong> n = 2, m = 3, indices = [[0,1],[1,1]]
23+
<strong>Output:</strong> 6
24+
<strong>Explanation:</strong> Initial matrix = [[0,0,0],[0,0,0]].
25+
After applying first increment it becomes [[1,2,1],[0,1,0]].
26+
The final matrix will be [[1,3,1],[1,3,1]] which contains 6 odd numbers.
27+
</pre>
28+
29+
<p><strong>Example 2:</strong></p>
30+
<img alt="" src="https://assets.leetcode.com/uploads/2019/10/30/e2.png" style="width: 600px; height: 150px;" />
31+
<pre>
32+
<strong>Input:</strong> n = 2, m = 2, indices = [[1,1],[0,0]]
33+
<strong>Output:</strong> 0
34+
<strong>Explanation:</strong> Final matrix = [[2,2],[2,2]]. There is no odd number in the final matrix.
35+
</pre>
36+
37+
<p>&nbsp;</p>
38+
<p><strong>Constraints:</strong></p>
39+
40+
<ul>
41+
<li><code>1 &lt;= n &lt;= 50</code></li>
42+
<li><code>1 &lt;= m &lt;= 50</code></li>
43+
<li><code>1 &lt;= indices.length &lt;= 100</code></li>
44+
<li><code>0 &lt;= indices[i][0] &lt;&nbsp;n</code></li>
45+
<li><code>0 &lt;= indices[i][1] &lt;&nbsp;m</code></li>
46+
</ul>
47+
48+
### Related Topics
49+
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
50+
51+
### Hints
52+
<details>
53+
<summary>Hint 1</summary>
54+
Simulation : With small constraints, it is possible to apply changes to each row and column and count odd cells after applying it.
55+
</details>
56+
57+
<details>
58+
<summary>Hint 2</summary>
59+
You can accumulate the number you should add to each row and column and then you can count the number of odd cells.
60+
</details>

problems/check-if-it-is-a-good-array/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[< Previous](https://github.com/openset/leetcode/tree/master/problems/minimum-remove-to-make-valid-parentheses "Minimum Remove to Make Valid Parentheses")
99

10-
Next >
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/average-selling-price "Average Selling Price")
1111

1212
## [1250. Check If It Is a Good Array (Hard)](https://leetcode.com/problems/check-if-it-is-a-good-array "检查「好数组」")
1313

problems/clone-graph/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<p><strong>Example:</strong></p>
1919

20-
<p><img alt="" src="https://assets.leetcode.com/uploads/2019/02/19/113_sample.png" style="width: 200px; height: 149px;" /></p>
20+
<p><img alt="" src="https://assets.leetcode.com/uploads/2019/11/04/133_clone_graph_question.png" style="width: 500px;height:550px" /></p>
2121

2222
<pre>
2323
<strong>Input:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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](https://github.com/openset/leetcode/tree/master/problems/number-of-closed-islands "Number of Closed Islands")
9+
                
10+
Next >
11+
12+
## [1255. Maximum Score Words Formed by Letters (Hard)](https://leetcode.com/problems/maximum-score-words-formed-by-letters "得分最高的单词集合")
13+
14+
<p>Given a list of <code>words</code>, list of&nbsp; single&nbsp;<code>letters</code> (might be repeating)&nbsp;and <code>score</code>&nbsp;of every character.</p>
15+
16+
<p>Return the maximum score of <strong>any</strong> valid set of words formed by using the given letters (<code>words[i]</code> cannot be used two&nbsp;or more times).</p>
17+
18+
<p>It is not necessary to use all characters in <code>letters</code> and each letter can only be used once. Score of letters&nbsp;<code>&#39;a&#39;</code>, <code>&#39;b&#39;</code>, <code>&#39;c&#39;</code>, ... ,<code>&#39;z&#39;</code> is given by&nbsp;<code>score[0]</code>, <code>score[1]</code>, ... , <code>score[25]</code> respectively.</p>
19+
20+
<p>&nbsp;</p>
21+
<p><strong>Example 1:</strong></p>
22+
23+
<pre>
24+
<strong>Input:</strong> words = [&quot;dog&quot;,&quot;cat&quot;,&quot;dad&quot;,&quot;good&quot;], letters = [&quot;a&quot;,&quot;a&quot;,&quot;c&quot;,&quot;d&quot;,&quot;d&quot;,&quot;d&quot;,&quot;g&quot;,&quot;o&quot;,&quot;o&quot;], score = [1,0,9,5,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0]
25+
<strong>Output:</strong> 23
26+
<strong>Explanation:</strong>
27+
Score a=1, c=9, d=5, g=3, o=2
28+
Given letters, we can form the words &quot;dad&quot; (5+1+5) and &quot;good&quot; (3+2+2+5) with a score of 23.
29+
Words &quot;dad&quot; and &quot;dog&quot; only get a score of 21.</pre>
30+
31+
<p><strong>Example 2:</strong></p>
32+
33+
<pre>
34+
<strong>Input:</strong> words = [&quot;xxxz&quot;,&quot;ax&quot;,&quot;bx&quot;,&quot;cx&quot;], letters = [&quot;z&quot;,&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;x&quot;,&quot;x&quot;,&quot;x&quot;], score = [4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,10]
35+
<strong>Output:</strong> 27
36+
<strong>Explanation:</strong>
37+
Score a=4, b=4, c=4, x=5, z=10
38+
Given letters, we can form the words &quot;ax&quot; (4+5), &quot;bx&quot; (4+5) and &quot;cx&quot; (4+5) with a score of 27.
39+
Word &quot;xxxz&quot; only get a score of 25.</pre>
40+
41+
<p><strong>Example 3:</strong></p>
42+
43+
<pre>
44+
<strong>Input:</strong> words = [&quot;leetcode&quot;], letters = [&quot;l&quot;,&quot;e&quot;,&quot;t&quot;,&quot;c&quot;,&quot;o&quot;,&quot;d&quot;], score = [0,0,1,1,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0]
45+
<strong>Output:</strong> 0
46+
<strong>Explanation:</strong>
47+
Letter &quot;e&quot; can only be used once.</pre>
48+
49+
<p>&nbsp;</p>
50+
<p><strong>Constraints:</strong></p>
51+
52+
<ul>
53+
<li><code>1 &lt;= words.length &lt;= 14</code></li>
54+
<li><code>1 &lt;= words[i].length &lt;= 15</code></li>
55+
<li><code>1 &lt;= letters.length &lt;= 100</code></li>
56+
<li><code>letters[i].length == 1</code></li>
57+
<li><code>score.length ==&nbsp;26</code></li>
58+
<li><code>0 &lt;= score[i] &lt;= 10</code></li>
59+
<li><code>words[i]</code>, <code>letters[i]</code>&nbsp;contains only lower case English letters.</li>
60+
</ul>
61+
62+
### Related Topics
63+
[[Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)]
64+
65+
### Hints
66+
<details>
67+
<summary>Hint 1</summary>
68+
Note that words.length is small. This means you can iterate over every subset of words (2^N).
69+
</details>

problems/minimum-swaps-to-make-strings-equal/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[Next >](https://github.com/openset/leetcode/tree/master/problems/count-number-of-nice-subarrays "Count Number of Nice Subarrays")
1111

12-
## [1247. Minimum Swaps to Make Strings Equal (Easy)](https://leetcode.com/problems/minimum-swaps-to-make-strings-equal "交换字符使得字符串相同")
12+
## [1247. Minimum Swaps to Make Strings Equal (Medium)](https://leetcode.com/problems/minimum-swaps-to-make-strings-equal "交换字符使得字符串相同")
1313

1414
<p>You are given two strings&nbsp;<code>s1</code>&nbsp;and&nbsp;<code>s2</code>&nbsp;of equal length&nbsp;consisting of letters <code>&quot;x&quot;</code> and <code>&quot;y&quot;</code> <strong>only</strong>. Your task is to&nbsp;make these two strings equal to each other. You can swap any two characters that belong to <strong>different</strong> strings,&nbsp;which means: swap <code>s1[i]</code> and <code>s2[j]</code>.</p>
1515

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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](https://github.com/openset/leetcode/tree/master/problems/reconstruct-a-2-row-binary-matrix "Reconstruct a 2-Row Binary Matrix")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/maximum-score-words-formed-by-letters "Maximum Score Words Formed by Letters")
11+
12+
## [1254. Number of Closed Islands (Medium)](https://leetcode.com/problems/number-of-closed-islands "统计封闭岛屿的数目")
13+
14+
<p>Given a 2D&nbsp;<code>grid</code> consists of <code>0s</code> (land)&nbsp;and <code>1s</code> (water).&nbsp; An <em>island</em> is a maximal 4-directionally connected group of <code><font face="monospace">0</font>s</code> and a <em>closed island</em>&nbsp;is an island <strong>totally</strong>&nbsp;(all left, top, right, bottom) surrounded by <code>1s.</code></p>
15+
16+
<p>Return the number of <em>closed islands</em>.</p>
17+
18+
<p>&nbsp;</p>
19+
<p><strong>Example 1:</strong></p>
20+
21+
<p><img alt="" src="https://assets.leetcode.com/uploads/2019/10/31/sample_3_1610.png" style="width: 240px; height: 120px;" /></p>
22+
23+
<pre>
24+
<strong>Input:</strong> grid = [[1,1,1,1,1,1,1,0],[1,0,0,0,0,1,1,0],[1,0,1,0,1,1,1,0],[1,0,0,0,0,1,0,1],[1,1,1,1,1,1,1,0]]
25+
<strong>Output:</strong> 2
26+
<strong>Explanation:</strong>
27+
Islands in gray are closed because they are completely surrounded by water (group of 1s).</pre>
28+
29+
<p><strong>Example 2:</strong></p>
30+
31+
<p><img alt="" src="https://assets.leetcode.com/uploads/2019/10/31/sample_4_1610.png" style="width: 160px; height: 80px;" /></p>
32+
33+
<pre>
34+
<strong>Input:</strong> grid = [[0,0,1,0,0],[0,1,0,1,0],[0,1,1,1,0]]
35+
<strong>Output:</strong> 1
36+
</pre>
37+
38+
<p><strong>Example 3:</strong></p>
39+
40+
<pre>
41+
<strong>Input:</strong> grid = [[1,1,1,1,1,1,1],
42+
&nbsp; [1,0,0,0,0,0,1],
43+
&nbsp; [1,0,1,1,1,0,1],
44+
&nbsp; [1,0,1,0,1,0,1],
45+
&nbsp; [1,0,1,1,1,0,1],
46+
&nbsp; [1,0,0,0,0,0,1],
47+
[1,1,1,1,1,1,1]]
48+
<strong>Output:</strong> 2
49+
</pre>
50+
51+
<p>&nbsp;</p>
52+
<p><strong>Constraints:</strong></p>
53+
54+
<ul>
55+
<li><code>1 &lt;= grid.length, grid[0].length &lt;= 100</code></li>
56+
<li><code>0 &lt;= grid[i][j] &lt;=1</code></li>
57+
</ul>
58+
59+
### Related Topics
60+
[[Depth-first Search](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)]
61+
62+
### Hints
63+
<details>
64+
<summary>Hint 1</summary>
65+
Exclude connected group of 0s on the corners because they are not closed island.
66+
</details>
67+
68+
<details>
69+
<summary>Hint 2</summary>
70+
Return number of connected component of 0s on the grid.
71+
</details>

0 commit comments

Comments
 (0)