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

Method compare

SortThePeople.java:12–14  ·  view source on GitHub ↗
(Integer a, Integer b)

Source from the content-addressed store, hash-verified

10 //merge sort, quick sort ....
11 Arrays.sort(index, new Comparator<Integer>(){
12 public int compare(Integer a, Integer b){
13 return heights[b] - heights[a];
14 }
15 });
16 String res[] = new String[n];
17 int i=0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected