Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Recursive merge sort logic */
- private static void sort(int[] elements, int[] aux, int low, int high) {
- if (high <= low) { // 1
- return; // 1
- }
- int mid = low + (high - low) / 2; // 2
- sort(elements, aux, low, mid); // 3
- sort(elements, aux, mid + 1, high); // 3
- merge(elements, aux, low, mid, high); // 4
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement