------
## 最终结论
```python
def oddEvenJumps(A):
    n = len(A)
    if n == 1:
        return 1

    def make_jump_indices(arr, is_odd):
        result = [None] * n
        stack = []
        for i in arr:
            while stack and (A[stack[-1]] < A[i] if is_odd else A[stack[-1]] > A[i]):
                result[stack.pop()] = i
            stack.append(i)
        return result

    sorted_indices = sorted(range(n), key=lambda i: (A[i], i))
    odd_next = make_jump_indices(sorted_indices, True)

    sorted_indices.sort(key=lambda i: (-A[i], i))
    even_next = make_jump_indices(sorted_indices, False)

    odd_reachable = [False] * n
    even_reachable = [False] * n
    odd_reachable[-1] = even_reachable[-1] = True

    for i in range(n - 2, -1, -1):
        if odd_next[i] is not None:
            odd_reachable[i] = even_reachable[odd_next[i]]
        if even_next[i] is not None:
            even_reachable[i] = odd_reachable[even_next[i]]

    return sum(odd_reachable)

# Example usage:
print(oddEvenJumps([10, 13, 12, 14, 15])) # Output: 2
print(oddEvenJumps([2, 3, 1, 1, 4]))     # Output: 3
print(oddEvenJumps([5, 1, 3, 4, 2]))     # Output: 3
```