Moore's Voting Algorithm

Array Presets

Algorithm Phases

1. Find Candidate Pending
2. Verify Majority Pending

Tug of War Mechanics

If the element matches our Candidate, we cast a +1 Vote.
If it's different, we cast a -1 Vote.
If votes drop to 0, the next element becomes the new candidate!

A majority element (appears > N/2 times) will always survive this cancellation process.

Live Console Log

Waiting for actions...

Current Candidate

?

Vote Count

0