Swapping neighbouring seats — SQL

Return each pupil alongside their seat after adjacent pairs have traded places, an unpaired last seat staying put, sorted by seat.

SQL · Medium

More in SQL

All algorithm problems