Skip to content

Commit 82488d2

Browse files
author
Shuo
authoredJul 10, 2019
Merge pull request #608 from openset/develop
Add: new
2 parents ab136d6 + 6408a01 commit 82488d2

File tree

11 files changed

+63
-6
lines changed

11 files changed

+63
-6
lines changed
 

‎README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ LeetCode Problems' Solutions
5454

5555
| # | Title | Solution | Difficulty |
5656
| :-: | - | - | :-: |
57+
| <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 |
58+
| <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 |
5759
| <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 |
5860
| <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 |
5961
| <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 |

‎internal/question/question.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func runQuestion(cmd *base.Command, args []string) {
3131
}
3232
question.SaveContent()
3333
question.SaveCodeSnippet()
34-
break
34+
return
3535
}
3636
}
3737
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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/maximum-nesting-depth-of-two-valid-parentheses-strings "Maximum Nesting Depth of Two Valid Parentheses Strings")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/reported-posts "Reported Posts")
11+
12+
## 1112. Highest Grade For Each Student (Medium)
13+
14+
15+
16+
### Similar Questions
17+
1. [Department Highest Salary](https://github.com/openset/leetcode/tree/master/problems/department-highest-salary) (Medium)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Create table If Not Exists Enrollments (student_id int, course_id int, grade int);
2+
Truncate table Enrollments;
3+
insert into Enrollments (student_id, course_id, grade) values ('2', '2', '95');
4+
insert into Enrollments (student_id, course_id, grade) values ('2', '3', '95');
5+
insert into Enrollments (student_id, course_id, grade) values ('1', '1', '90');
6+
insert into Enrollments (student_id, course_id, grade) values ('1', '2', '99');
7+
insert into Enrollments (student_id, course_id, grade) values ('3', '1', '80');
8+
insert into Enrollments (student_id, course_id, grade) values ('3', '2', '75');
9+
insert into Enrollments (student_id, course_id, grade) values ('3', '3', '82');

‎problems/largest-rectangle-in-histogram/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
</pre>
3434

3535
### Related Topics
36-
[[Stack](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)]
3736
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
37+
[[Stack](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)]
3838

3939
### Similar Questions
4040
1. [Maximal Rectangle](https://github.com/openset/leetcode/tree/master/problems/maximal-rectangle) (Hard)

‎problems/maximal-rectangle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
</pre>
2828

2929
### Related Topics
30-
[[Stack](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)]
3130
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
3231
[[Hash Table](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)]
3332
[[Dynamic Programming](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)]
33+
[[Stack](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)]
3434

3535
### Similar Questions
3636
1. [Largest Rectangle in Histogram](https://github.com/openset/leetcode/tree/master/problems/largest-rectangle-in-histogram) (Hard)

‎problems/maximum-nesting-depth-of-two-valid-parentheses-strings/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[< Previous](https://github.com/openset/leetcode/tree/master/problems/delete-nodes-and-return-forest "Delete Nodes And Return Forest")
99

10-
Next >
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/highest-grade-for-each-student "Highest Grade For Each Student")
1111

1212
## 1111. Maximum Nesting Depth of Two Valid Parentheses Strings (Hard)
1313

‎problems/reported-posts/README.md

Lines changed: 14 additions & 0 deletions
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/highest-grade-for-each-student "Highest Grade For Each Student")
9+
                
10+
Next >
11+
12+
## 1113. Reported Posts (Easy)
13+
14+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Create table If Not Exists Actions (user_id int, post_id int, action_date date, action ENUM('view', 'like', 'reaction', 'comment', 'report', 'share'), extra varchar(10));
2+
Truncate table Actions;
3+
insert into Actions (user_id, post_id, action_date, action, extra) values ('1', '1', '2019-07-01', 'view', 'None');
4+
insert into Actions (user_id, post_id, action_date, action, extra) values ('1', '1', '2019-07-01', 'like', 'None');
5+
insert into Actions (user_id, post_id, action_date, action, extra) values ('1', '1', '2019-07-01', 'share', 'None');
6+
insert into Actions (user_id, post_id, action_date, action, extra) values ('2', '4', '2019-07-04', 'view', 'None');
7+
insert into Actions (user_id, post_id, action_date, action, extra) values ('2', '4', '2019-07-04', 'report', 'spam');
8+
insert into Actions (user_id, post_id, action_date, action, extra) values ('3', '4', '2019-07-04', 'view', 'None');
9+
insert into Actions (user_id, post_id, action_date, action, extra) values ('3', '4', '2019-07-04', 'report', 'spam');
10+
insert into Actions (user_id, post_id, action_date, action, extra) values ('4', '3', '2019-07-02', 'view', 'None');
11+
insert into Actions (user_id, post_id, action_date, action, extra) values ('4', '3', '2019-07-02', 'report', 'spam');
12+
insert into Actions (user_id, post_id, action_date, action, extra) values ('5', '2', '2019-07-04', 'view', 'None');
13+
insert into Actions (user_id, post_id, action_date, action, extra) values ('5', '2', '2019-07-04', 'report', 'racism');
14+
insert into Actions (user_id, post_id, action_date, action, extra) values ('5', '5', '2019-07-04', 'view', 'None');
15+
insert into Actions (user_id, post_id, action_date, action, extra) values ('5', '5', '2019-07-04', 'report', 'racism');

‎problems/sort-colors/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
</ul>
3333

3434
### Related Topics
35-
[[Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)]
3635
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
3736
[[Two Pointers](https://github.com/openset/leetcode/tree/master/tag/two-pointers/README.md)]
37+
[[Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)]
3838

3939
### Similar Questions
4040
1. [Sort List](https://github.com/openset/leetcode/tree/master/problems/sort-list) (Medium)

‎problems/subsets/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
]</pre>
3333

3434
### Related Topics
35-
[[Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)]
3635
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
3736
[[Backtracking](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)]
37+
[[Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)]
3838

3939
### Similar Questions
4040
1. [Subsets II](https://github.com/openset/leetcode/tree/master/problems/subsets-ii) (Medium)

0 commit comments

Comments
 (0)
Please sign in to comment.