You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: solution/1100-1199/1174.Immediate Food Delivery II/README_EN.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
| order_date | date |
16
16
| customer_pref_delivery_date | date |
17
17
+-----------------------------+---------+
18
-
delivery_id is the primary key of this table.
18
+
delivery_id is the column of unique values of this table.
19
19
The table holds information about food delivery to customers that make orders at some date and specify a preferred delivery date (on the same order date or after it).
20
20
</pre>
21
21
@@ -25,9 +25,9 @@ The table holds information about food delivery to customers that make orders at
25
25
26
26
<p>The <strong>first order</strong> of a customer is the order with the earliest order date that the customer made. It is guaranteed that a customer has precisely one first order.</p>
27
27
28
-
<p>Write an SQL query to find the percentage of immediate orders in the first orders of all customers, <strong>rounded to 2 decimal places</strong>.</p>
28
+
<p>Write a solution to find the percentage of immediate orders in the first orders of all customers, <strong>rounded to 2 decimal places</strong>.</p>
29
29
30
-
<p>The query result format is in the following example.</p>
30
+
<p>The result format is in the following example.</p>
Copy file name to clipboardexpand all lines: solution/1200-1299/1204.Last Person to Fit in the Bus/README_EN.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
| weight | int |
16
16
| turn | int |
17
17
+-------------+---------+
18
-
person_id is the primary key column for this table.
18
+
person_id column contains unique values.
19
19
This table has the information about all people waiting for a bus.
20
20
The person_id and turn columns will contain all numbers from 1 to n, where n is the number of rows in the table.
21
21
turn determines the order of which the people will board the bus, where turn=1 denotes the first person to board and turn=n denotes the last person to board.
@@ -26,9 +26,9 @@ weight is the weight of the person in kilograms.
26
26
27
27
<p>There is a queue of people waiting to board a bus. However, the bus has a weight limit of <code>1000</code><strong> kilograms</strong>, so there may be some people who cannot board.</p>
28
28
29
-
<p>Write an SQL query to find the <code>person_name</code> of the <strong>last person</strong> that can fit on the bus without exceeding the weight limit. The test cases are generated such that the first person does not exceed the weight limit.</p>
29
+
<p>Write a solution to find the <code>person_name</code> of the <strong>last person</strong> that can fit on the bus without exceeding the weight limit. The test cases are generated such that the first person does not exceed the weight limit.</p>
30
30
31
-
<p>The query result format is in the following example.</p>
31
+
<p>The result format is in the following example.</p>
Copy file name to clipboardexpand all lines: solution/1200-1299/1212.Team Scores in Football Tournament/README_EN.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
| team_id | int |
14
14
| team_name | varchar |
15
15
+---------------+----------+
16
-
team_id is the primary key of this table.
16
+
team_id is the column with unique values of this table.
17
17
Each row of this table represents a single football team.
18
18
</pre>
19
19
@@ -31,7 +31,7 @@ Each row of this table represents a single football team.
31
31
| host_goals | int |
32
32
| guest_goals | int |
33
33
+---------------+---------+
34
-
match_id is the primary key of this table.
34
+
match_id is the column of unique values of this table.
35
35
Each row is a record of a finished match between two different teams.
36
36
Teams host_team and guest_team are represented by their IDs in the Teams table (team_id), and they scored host_goals and guest_goals goals, respectively.
37
37
</pre>
@@ -45,11 +45,11 @@ You would like to compute the scores of all teams after all matches. Points are
45
45
<li>A team receives <strong>no points</strong> if they lose a match (i.e., Scored fewer goals than the opponent team).</li>
46
46
</ul>
47
47
48
-
<p>Write an SQL query that selects the <code>team_id</code>, <code>team_name</code> and <code>num_points</code> of each team in the tournament after all described matches.</p>
48
+
<p>Write a solution that selects the <code>team_id</code>, <code>team_name</code> and <code>num_points</code> of each team in the tournament after all described matches.</p>
49
49
50
50
<p>Return the result table ordered by <code>num_points</code> <strong>in decreasing order</strong>. In case of a tie, order the records by <code>team_id</code> <strong>in increasing order</strong>.</p>
51
51
52
-
<p>The query result format is in the following example.</p>
52
+
<p>The result format is in the following example.</p>
Copy file name to clipboardexpand all lines: solution/1200-1299/1264.Page Recommendations/README_EN.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
| user1_id | int |
14
14
| user2_id | int |
15
15
+---------------+---------+
16
-
(user1_id, user2_id) is the primary key for this table.
16
+
(user1_id, user2_id) is the primary key (combination of columns with unique values) for this table.
17
17
Each row of this table indicates that there is a friendship relation between user1_id and user2_id.
18
18
</pre>
19
19
@@ -28,17 +28,17 @@ Each row of this table indicates that there is a friendship relation between use
28
28
| user_id | int |
29
29
| page_id | int |
30
30
+-------------+---------+
31
-
(user_id, page_id) is the primary key for this table.
31
+
(user_id, page_id) is the primary key (combination of columns with unique values) for this table.
32
32
Each row of this table indicates that user_id likes page_id.
33
33
</pre>
34
34
35
35
<p> </p>
36
36
37
-
<p>Write an SQL query to recommend pages to the user with <code>user_id = 1</code> using the pages that your friends liked. It should not recommend pages you already liked.</p>
37
+
<p>Write a solution to recommend pages to the user with <code>user_id = 1</code> using the pages that your friends liked. It should not recommend pages you already liked.</p>
38
38
39
39
<p>Return result table in <strong>any order</strong> without duplicates.</p>
40
40
41
-
<p>The query result format is in the following example.</p>
41
+
<p>The result format is in the following example.</p>
Copy file name to clipboardexpand all lines: solution/1200-1299/1270.All People Report to the Given Manager/README_EN.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -14,20 +14,20 @@
14
14
| employee_name | varchar |
15
15
| manager_id | int |
16
16
+---------------+---------+
17
-
employee_id is the primary key for this table.
17
+
employee_id is the column of unique values for this table.
18
18
Each row of this table indicates that the employee with ID employee_id and name employee_name reports his work to his/her direct manager with manager_id
19
19
The head of the company is the employee with employee_id = 1.
20
20
</pre>
21
21
22
22
<p> </p>
23
23
24
-
<p>Write an SQL query to find <code>employee_id</code> of all employees that directly or indirectly report their work to the head of the company.</p>
24
+
<p>Write a solution to find <code>employee_id</code> of all employees that directly or indirectly report their work to the head of the company.</p>
25
25
26
26
<p>The indirect relation between managers <strong>will not exceed three managers</strong> as the company is small.</p>
27
27
28
28
<p>Return the result table in <strong>any order</strong>.</p>
29
29
30
-
<p>The query result format is in the following example.</p>
30
+
<p>The result format is in the following example.</p>
Copy file name to clipboardexpand all lines: solution/1300-1399/1326.Minimum Number of Taps to Open to Water a Garden/README_EN.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## Description
6
6
7
-
<p>There is a one-dimensional garden on the x-axis. The garden starts at the point <code>0</code> and ends at the point <code>n</code>. (i.e The length of the garden is <code>n</code>).</p>
7
+
<p>There is a one-dimensional garden on the x-axis. The garden starts at the point <code>0</code> and ends at the point <code>n</code>. (i.e., the length of the garden is <code>n</code>).</p>
8
8
9
9
<p>There are <code>n + 1</code> taps located at points <code>[0, 1, ..., n]</code> in the garden.</p>
<li><code>DistanceLimitedPathsExist(int n, int[][] edgeList)</code>以给定的无向图初始化对象。</li>
15
-
<li><code>boolean query(int p, int q, int limit)</code>当存在一条从<code>p</code>到 <code>q</code> 的路径,且路径中每条边的距离都<strong>严格小于</strong> <code>limit</code> 时,返回 <code>true</code> ,否则返回 <code>false</code> 。</li>
14
+
<li><code>DistanceLimitedPathsExist(int n, int[][] edgeList)</code> 以给定的无向图初始化对象。</li>
15
+
<li><code>boolean query(int p, int q, int limit)</code> 当存在一条从 <code>p</code> 到 <code>q</code> 的路径,且路径中每条边的距离都<strong>严格小于</strong> <code>limit</code> 时,返回 <code>true</code> ,否则返回 <code>false</code> 。</li>
Copy file name to clipboardexpand all lines: solution/2200-2299/2261.K Divisible Elements Subarrays/README_EN.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## Description
6
6
7
-
<p>Given an integer array <code>nums</code> and two integers <code>k</code> and <code>p</code>, return <em>the number of <strong>distinct subarrays</strong> which have <strong>at most</strong></em> <code>k</code> <em>elements divisible by</em> <code>p</code>.</p>
7
+
<p>Given an integer array <code>nums</code> and two integers <code>k</code> and <code>p</code>, return <em>the number of <strong>distinct subarrays,</strong> which have <strong>at most</strong></em> <code>k</code> <em>elements </em>that are <em> divisible by</em> <code>p</code>.</p>
8
8
9
9
<p>Two arrays <code>nums1</code> and <code>nums2</code> are said to be <strong>distinct</strong> if:</p>
Copy file name to clipboardexpand all lines: solution/2500-2599/2561.Rearranging Fruits/README_EN.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
<p>You have two fruit baskets containing <code>n</code> fruits each. You are given two <strong>0-indexed</strong> integer arrays <code>basket1</code> and <code>basket2</code> representing the cost of fruit in each basket. You want to make both baskets <strong>equal</strong>. To do so, you can use the following operation as many times as you want:</p>
8
8
9
9
<ul>
10
-
<li>Chose two indices <code>i</code> and <code>j</code>, and swap the <code>i<sup>th</sup> </code>fruit of <code>basket1</code> with the <code>j<sup>th</sup></code>fruit of <code>basket2</code>.</li>
10
+
<li>Chose two indices <code>i</code> and <code>j</code>, and swap the <code>i<font size="1">th</font> </code>fruit of <code>basket1</code> with the <code>j<font size="1">th</font></code> fruit of <code>basket2</code>.</li>
11
11
<li>The cost of the swap is <code>min(basket1[i],basket2[j])</code>.</li>
0 commit comments