Algo-Phantoms / Algo-Tree

Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.
MIT License
356 stars 624 forks source link

Moore's voting algorithm to find the majority element in an array #2016

Open Pushpit07 opened 3 years ago

Pushpit07 commented 3 years ago

Is your feature request related to a problem? Please describe. In an array A of N elements, find the majority element in the array. A majority element in an array A of size N is an element that appears more than N/2 times in the array.

Describe the solution you'd like I would use Moore's voting algorithm to find the majority element in the array

Do you want to work on it I want to work on this problem in C++

Pushpit07 commented 3 years ago

Please assign it to me under GSSoC