Skip to content

Commit 30ecf62

Browse files
committed
update
1 parent ef313c2 commit 30ecf62

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

data/progress.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
20241227: 079,212(todo),362,849
1+
20241227: 079,212(todo),362,849,855(todo)
22
20241222: 369,311
33
20241221: 370
44
20241220: 815,871,593,1109

leetcode_java/src/main/java/dev/workspace6.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,4 +756,44 @@ public int maxDistToClosest(int[] seats) {
756756
return distances.get(distances.size()-1) / 2; // ??
757757
}
758758

759+
// LC 855
760+
// https://leetcode.com/problems/exam-room/description/
761+
// 5.31 PM - 5.50 pm
762+
/**
763+
* Your ExamRoom object will be instantiated and called as such:
764+
* ExamRoom obj = new ExamRoom(n);
765+
* int param_1 = obj.seat();
766+
* obj.leave(p);
767+
*/
768+
/**
769+
* IDEA:
770+
*
771+
*
772+
*/
773+
class ExamRoom {
774+
775+
int seated;
776+
List<Integer> seats;
777+
778+
public ExamRoom(int n) {
779+
this.seated = 0;
780+
this.seats = new ArrayList<>();
781+
// ?? optimize
782+
for(int i = 0; i < n; i++){
783+
this.seats.add(0);
784+
}
785+
}
786+
787+
public int seat() {
788+
if (this.seated == 0){
789+
//this.seats. = 1;
790+
}
791+
return 0;
792+
}
793+
794+
public void leave(int p) {
795+
796+
}
797+
}
798+
759799
}

0 commit comments

Comments
 (0)