Data Structures, Algorithms, Java, Big O Notation, Searching And Sorting.
remaining elements of L[] if any */ while (i < size1) { arr[mergedArrIndex] = Left[i]; i++; mergedArrIndex++; } /* Copy remaining elements of R[] if any */ while (j < size2) { arr[mergedArrIndex] = Right[j]; j++; mergedArrIndex++; } } // Main function that sorts arr[l..r] using // merge() void