Skip to content

Commit 5cb5efd

Browse files
author
Shuo
authored
Merge pull request #591 from openset/develop
Add: v1.3.2
2 parents 0a59f0b + 73f7be3 commit 5cb5efd

File tree

11 files changed

+131
-2
lines changed

11 files changed

+131
-2
lines changed

internal/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/openset/leetcode/internal/base"
88
)
99

10-
const version = "1.3.1"
10+
const version = "1.3.2"
1111

1212
var CmdVersion = &base.Command{
1313
Run: runVersion,
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 <[email protected]> |-->
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/inorder-successor-in-bst-ii "Inorder Successor in BST II")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/game-play-analysis-ii "Game Play Analysis II")
11+
12+
## 511. Game Play Analysis I (Easy)
13+
14+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Create table If Not Exists Activity (player_id int, device_id int, event_date date, games_played int);
2+
Truncate table Activity;
3+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '2', '2016-03-01', '5');
4+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '2', '2016-05-02', '6');
5+
insert into Activity (player_id, device_id, event_date, games_played) values ('2', '3', '2017-06-25', '1');
6+
insert into Activity (player_id, device_id, event_date, games_played) values ('3', '1', '2016-03-02', '0');
7+
insert into Activity (player_id, device_id, event_date, games_played) values ('3', '4', '2018-07-03', '5');
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 <[email protected]> |-->
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/game-play-analysis-i "Game Play Analysis I")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/find-bottom-left-tree-value "Find Bottom Left Tree Value")
11+
12+
## 512. Game Play Analysis II (Easy)
13+
14+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Create table If Not Exists Activity (player_id int, device_id int, event_date date, games_played int);
2+
Truncate table Activity;
3+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '2', '2016-03-01', '5');
4+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '2', '2016-05-02', '6');
5+
insert into Activity (player_id, device_id, event_date, games_played) values ('2', '3', '2017-06-25', '1');
6+
insert into Activity (player_id, device_id, event_date, games_played) values ('3', '1', '2016-03-02', '0');
7+
insert into Activity (player_id, device_id, event_date, games_played) values ('3', '4', '2018-07-03', '5');
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 <[email protected]> |-->
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/lonely-pixel-ii "Lonely Pixel II")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/encode-and-decode-tinyurl "Encode and Decode TinyURL")
11+
12+
## 534. Game Play Analysis III (Medium)
13+
14+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Create table If Not Exists Activity (player_id int, device_id int, event_date date, games_played int);
2+
Truncate table Activity;
3+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '2', '2016-03-01', '5');
4+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '2', '2016-05-02', '6');
5+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '3', '2017-06-25', '1');
6+
insert into Activity (player_id, device_id, event_date, games_played) values ('3', '1', '2016-03-02', '0');
7+
insert into Activity (player_id, device_id, event_date, games_played) values ('3', '4', '2018-07-03', '5');
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 <[email protected]> |-->
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/binary-tree-longest-consecutive-sequence-ii "Binary Tree Longest Consecutive Sequence II")
9+
                
10+
[Next >](https://github.com/openset/leetcode/tree/master/problems/student-attendance-record-i "Student Attendance Record I")
11+
12+
## 550. Game Play Analysis IV (Medium)
13+
14+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Create table If Not Exists Activity (player_id int, device_id int, event_date date, games_played int);
2+
Truncate table Activity;
3+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '2', '2016-03-01', '5');
4+
insert into Activity (player_id, device_id, event_date, games_played) values ('1', '2', '2016-03-02', '6');
5+
insert into Activity (player_id, device_id, event_date, games_played) values ('2', '3', '2017-06-25', '1');
6+
insert into Activity (player_id, device_id, event_date, games_played) values ('3', '1', '2016-03-02', '0');
7+
insert into Activity (player_id, device_id, event_date, games_played) values ('3', '4', '2018-07-03', '5');

problems/high-five/README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,38 @@
1111

1212
## 1086. High Five (Easy)
1313

14+
<p>Given a list of scores of different students, return the average score of each student&#39;s <strong>top five scores</strong> in<strong> the order of each student&#39;s id</strong>.</p>
1415

16+
<p>Each entry <code>items[i]</code>&nbsp;has <code>items[i][0]</code> the student&#39;s id, and <code>items[i][1]</code> the student&#39;s score.&nbsp; The average score is calculated using integer division.</p>
17+
18+
<p>&nbsp;</p>
19+
20+
<p><strong>Example 1:</strong></p>
21+
22+
<pre>
23+
<strong>Input: </strong><span id="example-input-1-1">[[1,91],[1,92],[2,93],[2,97],[1,60],[2,77],[1,65],[1,87],[1,100],[2,100],[2,76]]</span>
24+
<strong>Output: </strong><span id="example-output-1">[[1,87],[2,88]]</span>
25+
<strong>Explanation: </strong>
26+
The average of the student with id = 1 is 87.
27+
The average of the student with id = 2 is 88.6. But with integer division their average converts to 88.
28+
</pre>
29+
30+
<p>&nbsp;</p>
31+
32+
<p><strong>Note:</strong></p>
33+
34+
<ol>
35+
<li><code>1 &lt;= items.length &lt;= 1000</code></li>
36+
<li><code>items[i].length == 2</code></li>
37+
<li>The IDs of the students is between <code>1</code> to <code>1000</code></li>
38+
<li>The score of the students is between <code>1</code> to <code>100</code></li>
39+
<li>For each student,&nbsp;there are at least 5 scores</li>
40+
</ol>
1541

1642
### Related Topics
43+
[[Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)]
1744
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
1845
[[Hash Table](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)]
19-
[[Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)]
2046

2147
### Hints
2248
<details>

0 commit comments

Comments
 (0)