KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The majority element is the element that occurs more than half of the size of the array. How to find the majority element in an array in O(n) ? Example input: {2,1,2,3,4,2,1,2,2} Expected output: 2
Tags (comma-separated)
Save Edits
Cancel