Majority Element at Adobe

Easy66.1% acceptance

This problem has 75.0% frequency at Adobe.

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 Adobe Questions

View all Adobe questions