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