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

Method compare

PrimsAlgorithm.java:10–12  ·  view source on GitHub ↗
(int pair1[], int pair2[])

Source from the content-addressed store, hash-verified

8 //(parent, node, weight)
9 PriorityQueue<int[]> pq = new PriorityQueue<>(new Comparator<>(){
10 public int compare(int pair1[], int pair2[]){
11 return pair1[2] - pair2[2];
12 }
13 });
14 int sum=0;
15 ArrayList<int[]> edges = new ArrayList<>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected