```python
def find_peak_util(arr, low, high, n):
    """
    A recursive function to find a peak element in an array.
    A peak element is an element that is not smaller than its neighbors.
    For an input array arr[], the function returns one of the peak elements.
    """
    # Find index of middle element
    mid = low + (high - low) // 2

    # Compare middle element with its neighbours (if they exist)
    # Check if arr[mid] is a peak element
    if (mid == 0 or arr[mid - 1] <= arr[mid]) and \
       (mid == n - 1 or arr[mid + 1] <= arr[mid]):
        return arr[mid]

    # If middle element is not a peak and its left neighbor is greater
    # than it, then the peak element must be in the left half
    elif mid > 0 and arr[mid - 1] > arr[mid]:
        return find_peak_util(arr, low, (mid - 1), n)

    # If middle element is not a peak and its right neighbor is greater
    # than it, then the peak element must be in the right half
    else:
        return find_peak_util(arr, (mid + 1), high, n)

```