Skip to content

Add: new #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ LeetCode Problems' Solutions

| # | Title | Solution | Difficulty |
| :-: | - | - | :-: |
| <span id="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 |
| <span id="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 |
| <span id="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 |
| <span id="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 |
Expand All @@ -71,7 +72,7 @@ LeetCode Problems' Solutions
| <span id="1198">1198</span> | [Find Smallest Common Element in All Rows](https://leetcode.com/problems/find-smallest-common-element-in-all-rows "找出所有行中最小公共元素") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/find-smallest-common-element-in-all-rows) | Medium |
| <span id="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 |
| <span id="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 |
| <span id="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 |
| <span id="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 |
| <span id="1194">1194</span> | [Tournament Winners](https://leetcode.com/problems/tournament-winners) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/tournament-winners) | Hard |
| <span id="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 |
| <span id="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 |
Expand Down Expand Up @@ -123,7 +124,7 @@ LeetCode Problems' Solutions
| <span id="1146">1146</span> | [Snapshot Array](https://leetcode.com/problems/snapshot-array "快照数组") | [Go](https://github.com/openset/leetcode/tree/master/problems/snapshot-array) | Medium |
| <span id="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 |
| <span id="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 |
| <span id="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 |
| <span id="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 |
| <span id="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 |
| <span id="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 |
| <span id="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 |
Expand Down Expand Up @@ -196,7 +197,7 @@ LeetCode Problems' Solutions
| <span id="1073">1073</span> | [Adding Two Negabinary Numbers](https://leetcode.com/problems/adding-two-negabinary-numbers "负二进制数相加") | [Go](https://github.com/openset/leetcode/tree/master/problems/adding-two-negabinary-numbers) | Medium |
| <span id="1072">1072</span> | [Flip Columns For Maximum Number of Equal Rows](https://leetcode.com/problems/flip-columns-for-maximum-number-of-equal-rows "按列翻转得到最大值等行数") | [Go](https://github.com/openset/leetcode/tree/master/problems/flip-columns-for-maximum-number-of-equal-rows) | Medium |
| <span id="1071">1071</span> | [Greatest Common Divisor of Strings](https://leetcode.com/problems/greatest-common-divisor-of-strings "字符串的最大公因子") | [Go](https://github.com/openset/leetcode/tree/master/problems/greatest-common-divisor-of-strings) | Easy |
| <span id="1070">1070</span> | [Product Sales Analysis III](https://leetcode.com/problems/product-sales-analysis-iii) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/product-sales-analysis-iii) | Medium |
| <span id="1070">1070</span> | [Product Sales Analysis III](https://leetcode.com/problems/product-sales-analysis-iii "产品销售分析 III") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/product-sales-analysis-iii) | Medium |
| <span id="1069">1069</span> | [Product Sales Analysis II](https://leetcode.com/problems/product-sales-analysis-ii "产品销售分析 II") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/product-sales-analysis-ii) | Easy |
| <span id="1068">1068</span> | [Product Sales Analysis I](https://leetcode.com/problems/product-sales-analysis-i "产品销售分析 I") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/product-sales-analysis-i) | Easy |
| <span id="1067">1067</span> | [Digit Count in Range](https://leetcode.com/problems/digit-count-in-range "范围内的数字计数") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/digit-count-in-range) | Hard |
Expand Down
6 changes: 1 addition & 5 deletions problems/fizz-buzz-multithreaded/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[Next >](https://github.com/openset/leetcode/tree/master/problems/how-many-apples-can-you-put-into-the-basket "How Many Apples Can You Put into the Basket")

## [1195. Fizz Buzz Multithreaded (Medium)](https://leetcode.com/problems/fizz-buzz-multithreaded "")
## [1195. Fizz Buzz Multithreaded (Medium)](https://leetcode.com/problems/fizz-buzz-multithreaded "交替打印字符串")

<p>Write a program that outputs the string representation of numbers from 1 to&nbsp;<i>n</i>, however:</p>

Expand Down Expand Up @@ -40,7 +40,3 @@ class FizzBuzz {
<li>Thread C will call <code>fizzbuzz()</code>&nbsp;to check for divisibility of 3 and 5 and outputs&nbsp;<code>fizzbuzz</code>.</li>
<li>Thread D will call <code>number()</code> which should only output the numbers.</li>
</ol>

### Similar Questions
1. [Fizz Buzz](https://github.com/openset/leetcode/tree/master/problems/fizz-buzz) (Easy)
1. [Print Zero Even Odd](https://github.com/openset/leetcode/tree/master/problems/print-zero-even-odd) (Medium)
2 changes: 1 addition & 1 deletion problems/game-play-analysis-iv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[Next >](https://github.com/openset/leetcode/tree/master/problems/student-attendance-record-i "Student Attendance Record I")

## [550. Game Play Analysis IV (Medium)](https://leetcode.com/problems/game-play-analysis-iv "")
## [550. Game Play Analysis IV (Medium)](https://leetcode.com/problems/game-play-analysis-iv "游戏玩法分析 IV")



Expand Down
2 changes: 1 addition & 1 deletion problems/last-person-to-fit-in-the-elevator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[< Previous](https://github.com/openset/leetcode/tree/master/problems/sort-items-by-groups-respecting-dependencies "Sort Items by Groups Respecting Dependencies")

Next >
[Next >](https://github.com/openset/leetcode/tree/master/problems/monthly-transactions-ii "Monthly Transactions II")

## [1204. Last Person to Fit in the Elevator (Medium)](https://leetcode.com/problems/last-person-to-fit-in-the-elevator "")

Expand Down
10 changes: 1 addition & 9 deletions problems/longest-common-subsequence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[Next >](https://github.com/openset/leetcode/tree/master/problems/decrease-elements-to-make-array-zigzag "Decrease Elements To Make Array Zigzag")

## [1143. Longest Common Subsequence (Medium)](https://leetcode.com/problems/longest-common-subsequence "")
## [1143. Longest Common Subsequence (Medium)](https://leetcode.com/problems/longest-common-subsequence "最长公共子序列")

<p>Given two strings <code>text1</code> and <code>text2</code>, return the length of their longest common subsequence.</p>

Expand Down Expand Up @@ -53,14 +53,6 @@
<li>The input strings consist of lowercase English characters only.</li>
</ul>

### Related Topics
[[Dynamic Programming](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)]

### Similar Questions
1. [Longest Palindromic Subsequence](https://github.com/openset/leetcode/tree/master/problems/longest-palindromic-subsequence) (Medium)
1. [Delete Operation for Two Strings](https://github.com/openset/leetcode/tree/master/problems/delete-operation-for-two-strings) (Medium)
1. [Shortest Common Supersequence ](https://github.com/openset/leetcode/tree/master/problems/shortest-common-supersequence) (Hard)

### Hints
<details>
<summary>Hint 1</summary>
Expand Down
14 changes: 14 additions & 0 deletions problems/monthly-transactions-ii/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--|This file generated by command(leetcode description); DO NOT EDIT. |-->
<!--+----------------------------------------------------------------------+-->
<!--|@author openset <openset.wang@gmail.com> |-->
<!--|@link https://github.com/openset |-->
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/last-person-to-fit-in-the-elevator "Last Person to Fit in the Elevator")

Next >

## [1205. Monthly Transactions II (Medium)](https://leetcode.com/problems/monthly-transactions-ii "")


14 changes: 14 additions & 0 deletions problems/monthly-transactions-ii/mysql_schemas.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
create table if not exists Transactions (id int, country varchar(4), state enum('approved', 'declined'), amount int, trans_date date)
;
create table if not exists Chargebacks (trans_id int, trans_date date)
;
Truncate table Transactions;
insert into Transactions (id, country, state, amount, trans_date) values ('101', 'US', 'approved', '1000', '2019-05-18');
insert into Transactions (id, country, state, amount, trans_date) values ('102', 'US', 'declined', '2000', '2019-05-19');
insert into Transactions (id, country, state, amount, trans_date) values ('103', 'US', 'approved', '3000', '2019-06-10');
insert into Transactions (id, country, state, amount, trans_date) values ('104', 'US', 'declined', '4000', '2019-06-13');
insert into Transactions (id, country, state, amount, trans_date) values ('105', 'US', 'approved', '5000', '2019-06-15');
Truncate table Chargebacks;
insert into Chargebacks (trans_id, trans_date) values ('102', '2019-05-29');
insert into Chargebacks (trans_id, trans_date) values ('101', '2019-06-30');
insert into Chargebacks (trans_id, trans_date) values ('105', '2019-09-18');
2 changes: 1 addition & 1 deletion problems/product-sales-analysis-iii/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

[Next >](https://github.com/openset/leetcode/tree/master/problems/greatest-common-divisor-of-strings "Greatest Common Divisor of Strings")

## [1070. Product Sales Analysis III (Medium)](https://leetcode.com/problems/product-sales-analysis-iii "")
## [1070. Product Sales Analysis III (Medium)](https://leetcode.com/problems/product-sales-analysis-iii "产品销售分析 III")


Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
### Related Topics
[[Depth-first Search](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)]
[[Graph](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)]
[[Topological Sort](https://github.com/openset/leetcode/tree/master/tag/topological-sort/README.md)]

### Hints
<details>
Expand Down
2 changes: 1 addition & 1 deletion readme/301-600.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ LeetCode Problems' Solutions
| <span id="547">547</span> | [Friend Circles](https://leetcode.com/problems/friend-circles "朋友圈") | [Go](https://github.com/openset/leetcode/tree/master/problems/friend-circles) | Medium |
| <span id="548">548</span> | [Split Array with Equal Sum](https://leetcode.com/problems/split-array-with-equal-sum "将数组分割成和相等的子数组") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/split-array-with-equal-sum) | Medium |
| <span id="549">549</span> | [Binary Tree Longest Consecutive Sequence II](https://leetcode.com/problems/binary-tree-longest-consecutive-sequence-ii "二叉树中最长的连续序列") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/binary-tree-longest-consecutive-sequence-ii) | Medium |
| <span id="550">550</span> | [Game Play Analysis IV](https://leetcode.com/problems/game-play-analysis-iv) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/game-play-analysis-iv) | Medium |
| <span id="550">550</span> | [Game Play Analysis IV](https://leetcode.com/problems/game-play-analysis-iv "游戏玩法分析 IV") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/game-play-analysis-iv) | Medium |
| <span id="551">551</span> | [Student Attendance Record I](https://leetcode.com/problems/student-attendance-record-i "学生出勤记录 I") | [Go](https://github.com/openset/leetcode/tree/master/problems/student-attendance-record-i) | Easy |
| <span id="552">552</span> | [Student Attendance Record II](https://leetcode.com/problems/student-attendance-record-ii "学生出勤记录 II") | [Go](https://github.com/openset/leetcode/tree/master/problems/student-attendance-record-ii) | Hard |
| <span id="553">553</span> | [Optimal Division](https://leetcode.com/problems/optimal-division "最优除法") | [Go](https://github.com/openset/leetcode/tree/master/problems/optimal-division) | Medium |
Expand Down