LeetCode: 169-Majority Element 解題紀錄
題目
Given an arrayRead More »LeetCode: 169-Majority Element 解題紀錄nums
of sizen
, return the majority element. The majority element is the element that appears more than⌊n / 2⌋
times. You may assume that the majority element always exists in the array.