public int solution(int[] array) {
		if (array.length < 2) {
			return array.length;
		}
		int i = 0;
		int j = array.length - 1;
		long current = max(abs(array[i]), abs(array[j]));
		int count = 1;
		while (i <= j) {
			if (abs(array[i]) == current) {
				i++;
				continue;
			}
			if (abs(array[j]) == current) {
				j--;
				continue;
			}
			current = max(abs(array[i]), abs(array[j]));
			count++;
		}
		return i == j ? count + 1 : count;
	}