An exam room has n seats in a row, numbered 0 to n - 1. Build an ExamRoom class.
new ExamRoom(n)seat() places a student in the seat that maximises the distance to the closest other student, and returns that seat number. If several seats tie, take the lowest. If the room is empty, the student sits in seat 0leave(p) removes the student from seat p; a student is always there- The ends count: a student in seat 0 or seat n - 1 has only one neighbour, so sitting at an end has distance equal to the whole gap to the nearest student
seat() is never called when the room is fulln can be 109 with up to 104 calls, so do not scan the row