Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 626. Exchange Seats
Given a table of students with consecutive integer ids starting at 1, return the rows where each adjacent pair of students (ids 1&2, 3&4, ...) have their seat ids swapped while leaving the final row unchanged if the count is odd, and order the result by id ascending.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.