結果 : check for majority element in a sorted array leetcode