1150. Check If a Number Is Majority Element in a Sorted Array

Given a sorted array nums of length n and a target element target, return true if target appears more than n/2 times in the array, otherwise return false.

Since the array is sorted, equal elements are contiguous.

Examples
Input: [[1],1]
Output: true
Hints
Related Problems

1150. Check If a Number Is Majority Element in a Sorted Array

Given a sorted array `nums` of length `n` and a target element `target`, return `true` if target appears more than n/2 times in the array, otherwise return `false`.