Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 438 Bytes

File metadata and controls

11 lines (7 loc) · 438 Bytes

Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space.

  1. How many majority elements could it possibly have?
  2. Do you have a better hint? Suggest it!

Show Tags Array

Show Similar Problems (E) Majority Element