yashasvi-goel / Basic-C-programs

Repo for basic programs
MIT License
4 stars 9 forks source link

Added Moore's Algorithm #25

Closed Prakhar-wq closed 4 years ago

Prakhar-wq commented 4 years ago

This Algorithm is used to find Majority Element.If any element is present more than N/2 times in an array of numbers i.e a Majority Element.Moore's Voting Algorithm is of two steps.First we find the element and then we check in the next step.