Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1538. Guess the Majority in a Hidden Array
Given a hidden array accessible only via a query API (e.g., compare elements or check equality), determine whether a value appears more than n/2 times and return an index of that majority element (or -1 if none). The core challenge is to infer the majority with limited queries efficiently using majority-vote style elimination and counting.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.