@@ -0,0 +1,1069 @@
+package com.dev.namhoai.sort;%0A%0Apublic class MergeSort %7B%0A%0A    public static void sort(int%5B%5D a) %7B%0A        int%5B%5D helper = new int%5Ba.length%5D;%0A        sort(a, 0, a.length - 1, helper);%0A%0A    %7D%0A%0A    public static void sort(int%5B%5D a, int low, int high, int%5B%5D helper) %7B%0A        if (low %3E= high) %7B%0A            return;%0A        %7D%0A        int middle = low + (high - low) / 2;%0A        sort(a, low, middle, helper);%0A        sort(a, middle + 1, high, helper);%0A        merge(a, low, middle, high, helper);%0A    %7D%0A%0A    public static void merge(int%5B%5D a, int low, int middle, int high, int%5B%5D helper) %7B%0A        for (int i = low; i %3C= high; i++) %7B%0A            helper%5Bi%5D = a%5Bi%5D;%0A        %7D%0A        int i = low;%0A        int j = middle + 1;%0A%0A        for (int k = low; k %3C= high; k++) %7B%0A            if (i %3E middle) %7B%0A                a%5Bk%5D = helper%5Bj++%5D;%0A            %7D else if (j %3E high) %7B%0A                a%5Bk%5D = helper%5Bi++%5D;%0A            %7D else if (helper%5Bi%5D %3C= helper%5Bj%5D) %7B%0A                a%5Bk%5D = helper%5Bi++%5D;%0A            %7D else %7B%0A                a%5Bk%5D = helper%5Bj++%5D;%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Add Merge Sort in Java