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

Method compare

DijkstraAlgorithm.java:15–17  ·  view source on GitHub ↗
(int p1[], int p2[])

Source from the content-addressed store, hash-verified

13 // [node, dist]
14 PriorityQueue<int[]> pq = new PriorityQueue<>(new Comparator<int[]>(){
15 public int compare(int p1[], int p2[]){
16 return p1[1] - p2[1];
17 }
18 });
19 int dist[] = new int[V];
20 Arrays.fill(dist,Integer.MAX_VALUE);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected