Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#2 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#3 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#4 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#5 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#6 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#7 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#8 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#9 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#10 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#11 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#12 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#13 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#14 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#15 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#16 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#17 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#18 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#19 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#20 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#21 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#22 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#23 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#24 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#25 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#26 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
||
#27 |
Error de compilación
Main.java:1: error: class, interface, or enum expected private static int[] mergeSort(int[] array, int start, int end){ ^ Main.java:4: error: class, interface, or enum expected } ^ Main.java:7: error: class, interface, or enum expected int startLeft = start; ^ Main.java:8: error: class, interface, or enum expected int endLeft = middle; ^ Main.java:9: error: class, interface, or enum expected int startRight = middle+1; ^ Main.java:10: error: class, interface, or enum expected int endRight = end; ^ Main.java:12: error: class, interface, or enum expected int[] orderedLeft = mergeSort(array, startLeft, endLeft); ^ Main.java:13: error: class, interface, or enum expected int[] orderedRight = mergeSort(array, startRight, endRight); ^ Main.java:15: error: class, interface, or enum expected int leftPointer = 0; ^ Main.java:16: error: class, interface, or enum expected int rightPointer = 0; ^ Main.java:18: error: class, interface, or enum expected int n = end - start + 1; ^ Main.java:19: error: class, interface, or enum expected int[] orderedArray = new int[n]; ^ Main.java:20: error: class, interface, or enum expected int orderedArrayPointer = 0; ^ Main.java:21: error: class, interface, or enum expected while (orderedArrayPointer < n){ ^ Main.java:24: error: class, interface, or enum expected int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; ^ Main.java:26: error: class, interface, or enum expected if(leftValue<rightValue){ ^ Main.java:28: error: class, interface, or enum expected leftPointer++; ^ Main.java:29: error: class, interface, or enum expected } else { ^ Main.java:31: error: class, interface, or enum expected rightPointer++; ^ Main.java:32: error: class, interface, or enum expected } ^ Main.java:34: error: class, interface, or enum expected } ^ Main.java:37: error: class, interface, or enum expected } ^ 22 errors |
private static int[] mergeSort(int[] array, int start, int end){ if(start == end){ return new int[]{array[start]}; } int middle = (end+start)/2; int startLeft = start; int endLeft = middle; int startRight = middle+1; int endRight = end; int[] orderedLeft = mergeSort(array, startLeft, endLeft); int[] orderedRight = mergeSort(array, startRight, endRight); int leftPointer = 0; int rightPointer = 0; int n = end - start + 1; int[] orderedArray = new int[n]; int orderedArrayPointer = 0; while (orderedArrayPointer < n){ int leftValue = leftPointer<orderedLeft.length ? orderedLeft[leftPointer] : Integer.MAX_VALUE; int rightValue = rightPointer<orderedRight.length ? orderedRight[rightPointer] : Integer.MAX_VALUE; if(leftValue<rightValue){ orderedArray[orderedArrayPointer] = leftValue; leftPointer++; } else { orderedArray[orderedArrayPointer] = rightValue; rightPointer++; } orderedArrayPointer++; } return orderedArray; } }