MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / compare

Method compare

NumberOfSmallestUnoccupiedChair.java:6–8  ·  view source on GitHub ↗
(int a[], int b[])

Source from the content-addressed store, hash-verified

4 int targetArrival = times[targetFriend][0]; //[a,d]
5 Arrays.sort(times, new Comparator<int[]>(){
6 public int compare(int a[], int b[]){
7 return a[0] - b[0];
8 }
9 });
10 //[lt,chairNo]
11 PriorityQueue<int[]> occupied = new PriorityQueue<>(new Comparator<int[]>(){

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected