/** * Java implementation of merge sort * * @author Carlos Abraham Hernandez * @email [email protected] */ import java.util.Arrays; public class MergeSort{ // Merge the two half into a sorted data. public void merge(int arr[], int left, int middle, int right){ int n1 = middle - left + 1; int n2 = right - middle; int L[] = new int [n1]; int R[] = new int [n2]; for (int i=0; i