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

Method compare

NetworkDelayTime.java:5–7  ·  view source on GitHub ↗
(int p1[], int p2[])

Source from the content-addressed store, hash-verified

3 // pair -> (node, time)
4 PriorityQueue<int[]> pq = new PriorityQueue<>(new Comparator<int[]>(){
5 public int compare(int p1[], int p2[]){
6 return p1[1] - p2[1];
7 }
8 });
9 int time[] = new int[n];
10 Arrays.fill(time,Integer.MAX_VALUE);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected