Function to merge the subarrays arr [ l . . m ] and arr [ m + 1 , . . r ] based on indices [ ]
static void merge ( int [ ] indices , int [ ] a , int l , int mid , int r ) { int [ ] temp_ind = new int [ r - l + 1 ] ; int j = mid + 1 ; int i = 0 , temp_l = l , k ; while ( l <= mid && j <= r ) {