Majority Element at Qualcomm

Easy66.1% acceptance

This problem has 62.5% frequency at Qualcomm.

Problem Description

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.

Read full problem and hints

Topics

Also asked at 21 companies


More Qualcomm Questions

View all Qualcomm questions