Skip to content
Snippets Groups Projects
Commit 85708135 authored by Lawrence Chung's avatar Lawrence Chung
Browse files

Recursive segment attempt

parent 16d56521
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,19 @@ package sort;
public class mergeSort {
private static GeneralCompare[] aux;
public static void merge(GeneralCompare[] gc, int n){
aux = new GeneralCompare[n];
if(n <= 1)
return;
int mid = n/2;
merge(gc, mid);
merge(gc, mid+1);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment