LeetCode: 169-Majority Element 解題紀錄
Last Updated on 2022-02-21 by Clay
題目
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.