This function sorts the input array and returns the number of inversions in the array
static int mergeSort ( int [ ] arr , int array_size ) { int [ ] temp = new int [ array_size ] ; return _mergeSort ( arr , temp , 0 , array_size - 1 ) ; }