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

Method compare

KruskalsAlgorithm.java:6–8  ·  view source on GitHub ↗
(int pair1[], int pair2[])

Source from the content-addressed store, hash-verified

4 //(u, v, weight)
5 PriorityQueue<int[]> pq = new PriorityQueue<>(new Comparator<>(){
6 public int compare(int pair1[], int pair2[]){
7 return pair1[2] - pair2[2];
8 }
9 });
10 // insert edges in pq
11 for(int i=0;i<V;i++){

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected