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: [[2,4,5,5,5,5,5,6,6],5]
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`.