1204. Last Person to Fit in the Bus
Description
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| person\_id | int |
| person\_name | varchar |
| weight | int |
| turn | int |
+-------------+---------+
person\_id is the primary key column for this table.
This table has the information about all people waiting for a bus.
The person\_id and turn columns will contain all numbers from 1 to n, where n is the number of rows in the table.
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.
weight is the weight of the person in kilograms.ac
Last updated