Reassigning Classroom Seats
A school admin wants to preview the new seating plan: every two consecutive students swap seats. Output id and student reflecting the post-swap arrangement. If the student count is odd, the last student keeps their seat. Sort by id.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.
| id | student |
|---|---|
| 1 | Bob |
| 2 | Alice |
| 3 | Dave |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in