Method
validate
(int[] array, int left, int right, int pivot, int endLeft)
Source from the content-addressed store, hash-verified
| 19 | } |
| 20 | |
| 21 | public static boolean validate(int[] array, int left, int right, int pivot, int endLeft) { |
| 22 | for (int i = left; i <= endLeft; i++) { |
| 23 | if (array[i] > pivot) { |
| 24 | return false; |
| 25 | } |
| 26 | } |
| 27 | for (int i = endLeft + 1; i <= right; i++) { |
| 28 | if (array[i] <= pivot) { |
| 29 | return false; |
| 30 | } |
| 31 | } |
| 32 | return true; |
| 33 | } |
| 34 | |
| 35 | public static boolean validateFull(int[] array) { |
| 36 | for (int i = 0; i < array.length; i++) { |
Tested by
no test coverage detected