Function that sorts the input array and returns the number of inversions in the array
function mergeSort ( arr , array_size ) { let temp = new Array ( array_size ) ; return _mergeSort ( arr , temp , 0 , array_size - 1 ) ; }