An auxiliary recursive function that sorts the input array and returns the number of inversions in the array .
function _mergeSort ( arr , temp , left , right ) { let mid , inv_count = 0 ; if ( right > left ) {