Leetcode 0169. Majority Element
Posted on Thu 27 October 2022 in Leetcode • Tagged with counting, boyer-moore-voting-algorithm
Question Link : https://leetcode.com/problems/majority-element/
Difficulty: Easy
Question
Given an array nums of size n, 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. Example 1: Input: nums …
Continue reading