private boolean verifyPart(int[] arr, int start, int end, int max, int min) {
		if (start > end)
			return true;
		if (arr[end] <= max && arr[end] >= min) {
			if (start == end)
				return true;
			
			int smaller;
			for (smaller = start; smaller < end; smaller++) {
				if (arr[smaller] > arr[end])
					break;
				else if (arr[smaller] == arr[end] || arr[smaller] < min)
					return false;
			}
			return verifyPart(arr, start, smaller-1, arr[end]-1, min) &&
					verifyPart(arr, smaller, end-1, max, arr[end]+1);
		} else {
			return false;
		}
	}