diff --git a/Arrays/Moore_Voting_Algorithm.cpp b/Arrays/Moore_Voting_Algorithm.cpp new file mode 100644 index 0000000..702f781 --- /dev/null +++ b/Arrays/Moore_Voting_Algorithm.cpp @@ -0,0 +1,48 @@ +#include +using namespace std; + +int moore_voting(int [], int); + +int main() +{ + int n, ar[50]; + cout << "Enter the size of the array: "; + cin >> n; + for(int i = 0; i