Skip to content

Add: new #608

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 2 commits into from
Jul 10, 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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ LeetCode Problems' Solutions

| # | Title | Solution | Difficulty |
| :-: | - | - | :-: |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
Expand Down
2 changes: 1 addition & 1 deletion internal/question/question.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func runQuestion(cmd *base.Command, args []string) {
}
question.SaveContent()
question.SaveCodeSnippet()
break
return
}
}
}
Expand Down
17 changes: 17 additions & 0 deletions problems/highest-grade-for-each-student/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--|This file generated by command(leetcode description); DO NOT EDIT. |-->
<!--+----------------------------------------------------------------------+-->
<!--|@author Openset <[email protected]> |-->
<!--|@link https://github.com/openset |-->
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< 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")

[Next >](https://github.com/openset/leetcode/tree/master/problems/reported-posts "Reported Posts")

## 1112. Highest Grade For Each Student (Medium)



### Similar Questions
1. [Department Highest Salary](https://github.com/openset/leetcode/tree/master/problems/department-highest-salary) (Medium)
9 changes: 9 additions & 0 deletions problems/highest-grade-for-each-student/mysql_schemas.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Create table If Not Exists Enrollments (student_id int, course_id int, grade int);
Truncate table Enrollments;
insert into Enrollments (student_id, course_id, grade) values ('2', '2', '95');
insert into Enrollments (student_id, course_id, grade) values ('2', '3', '95');
insert into Enrollments (student_id, course_id, grade) values ('1', '1', '90');
insert into Enrollments (student_id, course_id, grade) values ('1', '2', '99');
insert into Enrollments (student_id, course_id, grade) values ('3', '1', '80');
insert into Enrollments (student_id, course_id, grade) values ('3', '2', '75');
insert into Enrollments (student_id, course_id, grade) values ('3', '3', '82');
2 changes: 1 addition & 1 deletion problems/largest-rectangle-in-histogram/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
</pre>

### Related Topics
[[Stack](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)]
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
[[Stack](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)]

### Similar Questions
1. [Maximal Rectangle](https://github.com/openset/leetcode/tree/master/problems/maximal-rectangle) (Hard)
2 changes: 1 addition & 1 deletion problems/maximal-rectangle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
</pre>

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

### Similar Questions
1. [Largest Rectangle in Histogram](https://github.com/openset/leetcode/tree/master/problems/largest-rectangle-in-histogram) (Hard)
Expand Down
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/delete-nodes-and-return-forest "Delete Nodes And Return Forest")

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

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

Expand Down
14 changes: 14 additions & 0 deletions problems/reported-posts/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 <[email protected]> |-->
<!--|@link https://github.com/openset |-->
<!--|@home https://github.com/openset/leetcode |-->
<!--+----------------------------------------------------------------------+-->

[< Previous](https://github.com/openset/leetcode/tree/master/problems/highest-grade-for-each-student "Highest Grade For Each Student")

Next >

## 1113. Reported Posts (Easy)


15 changes: 15 additions & 0 deletions problems/reported-posts/mysql_schemas.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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));
Truncate table Actions;
insert into Actions (user_id, post_id, action_date, action, extra) values ('1', '1', '2019-07-01', 'view', 'None');
insert into Actions (user_id, post_id, action_date, action, extra) values ('1', '1', '2019-07-01', 'like', 'None');
insert into Actions (user_id, post_id, action_date, action, extra) values ('1', '1', '2019-07-01', 'share', 'None');
insert into Actions (user_id, post_id, action_date, action, extra) values ('2', '4', '2019-07-04', 'view', 'None');
insert into Actions (user_id, post_id, action_date, action, extra) values ('2', '4', '2019-07-04', 'report', 'spam');
insert into Actions (user_id, post_id, action_date, action, extra) values ('3', '4', '2019-07-04', 'view', 'None');
insert into Actions (user_id, post_id, action_date, action, extra) values ('3', '4', '2019-07-04', 'report', 'spam');
insert into Actions (user_id, post_id, action_date, action, extra) values ('4', '3', '2019-07-02', 'view', 'None');
insert into Actions (user_id, post_id, action_date, action, extra) values ('4', '3', '2019-07-02', 'report', 'spam');
insert into Actions (user_id, post_id, action_date, action, extra) values ('5', '2', '2019-07-04', 'view', 'None');
insert into Actions (user_id, post_id, action_date, action, extra) values ('5', '2', '2019-07-04', 'report', 'racism');
insert into Actions (user_id, post_id, action_date, action, extra) values ('5', '5', '2019-07-04', 'view', 'None');
insert into Actions (user_id, post_id, action_date, action, extra) values ('5', '5', '2019-07-04', 'report', 'racism');
2 changes: 1 addition & 1 deletion problems/sort-colors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
</ul>

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

### Similar Questions
1. [Sort List](https://github.com/openset/leetcode/tree/master/problems/sort-list) (Medium)
Expand Down
2 changes: 1 addition & 1 deletion problems/subsets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
]</pre>

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

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