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

Method inversionCount

CountInversions.java:6–12  ·  view source on GitHub ↗
(long arr[], long N)

Source from the content-addressed store, hash-verified

4 // N : Size of the Array arr[]
5 //Function to count inversions in the array.
6 static long inversionCount(long arr[], long N)
7 {
8
9 // Your Code Here
10 return mergeSort(arr,0,N-1);
11
12 }
13 public static long mergeSort(long arr[],long s, long f)
14 {
15 long inv_count=0;

Callers

nothing calls this directly

Calls 1

mergeSortMethod · 0.95

Tested by

no test coverage detected