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
<strong>Explanation:</strong> You can get the looped string "-abcxyz-", "-abczyx-", "-cbaxyz-", "-cbazyx-", where '-' represents the looped status.
40
+
<strong>Explanation:</strong> You can get the looped string "-abcxyz-", "-abczyx-", "-cbaxyz-", "-cbazyx-", where '-' represents the looped status.
41
41
The answer string came from the fourth looped one, where you could cut from the middle character 'a' and get "zyxcba".
@@ -56,29 +56,30 @@ Each row includes the vehicle's ID, the driver who operates it, the model, f
56
56
| duration | int |
57
57
| rating | int |
58
58
+--------------+---------+
59
-
(trip_id) is the unique key for this table.
60
-
Each row includes a trip's ID, the vehicle used, the distance covered (in miles), the trip duration (in minutes), and the passenger's rating (1-5).
<p>Uber is analyzing drivers based on their trips. Write a solution to find the <strong>top-performing driver</strong> for <strong>each fuel type</strong> based on the following criteria:</p>
<li>A driver's performance is calculated as the <strong>average rating</strong> across all their trips. Average rating should be rounded to <code>2</code> decimal places.</li>
67
-
<li>If two drivers have the same average rating, the driver with the <strong>longer total distance</strong> traveled should be ranked higher.</li>
68
-
<li>If there is <strong>still a tie</strong>, choose the driver with the <strong>fewest accidents</strong>.</li>
@@ -128,14 +129,14 @@ Each row includes a trip's ID, the vehicle used, the distance covered (in mi
128
129
+-----------+-----------+--------+----------+
129
130
</pre>
130
131
131
-
<p><strong>Explanation:</strong></p>
132
+
<p><strong>解释:</strong></p>
132
133
133
134
<ul>
134
-
<li>For fuel type <code>Gasoline</code>, both Alice (Driver 1) and Charlie (Driver 3) have trips. Charlie has an average rating of 5.0, while Alice has 4.5. Therefore, Charlie is selected.</li>
135
-
<li>For fuel type <code>Electric</code>, Bob (Driver 2) is the only driver with an average rating of 4.5, so he is selected.</li>
135
+
<li>对于动力类型 <code>Gasoline</code>,Alice(司机 1)和 Charlie(司机 3)有行程。Charlie 平均评分为 5.0,而 Alice 为 4.5。因此,选择 Charlie。</li>
<p>Return <em>the result table ordered by</em> <em>the count of matching-letter cities in <strong>descending</strong> order</em> <em>and then by state name in <strong>ascending</strong> order</em>.</p>
0 commit comments