Boyer–Moore majority vote: one candidate, one counter, and why you need a second pass
MJRTY (Boyer and Moore, 1980) picks a majority candidate with one value and one counter. Its rules, why it works, the wrong answer when no majority exists, and the second pass.
algorithmsmajority-votestreamingcomplexity