package leetcode;

/**
 * https://leetcode.com/problems/exam-room/
 */
public class Problem855 {
    private static class ExamRoom {
        public ExamRoom(int N) {
        }

        public int seat() {
            // TODO
            return 0;
        }

        public void leave(int p) {
            // TODO
        }
    }

    public static void main(String[] args) {
        ExamRoom room = new ExamRoom(10);
        System.out.println(room.seat()); // 0
        System.out.println(room.seat()); // 9
        System.out.println(room.seat()); // 4
        System.out.println(room.seat()); // 2
        room.leave(4);
        System.out.println(room.seat()); // 5
    }
}

@@ -12,16 +12,43 @@
 tcode;%0A%0A
+import java.util.TreeSet;%0A%0A
 /**%0A * h
@@ -153,16 +153,108 @@
 mRoom %7B%0A
+        private final int n;%0A        private final TreeSet%3CInteger%3E set = new TreeSet%3C%3E();%0A%0A
         
@@ -274,24 +274,48 @@
 om(int N) %7B%0A
+            this.n = N;%0A
         %7D%0A%0A 

Update problem 855