Hacktoberfest2021 icon indicating copy to clipboard operation
Hacktoberfest2021 copied to clipboard

majority element

Open suhas-kadu opened this issue 3 years ago • 0 comments

Problem statement: Given an array of n elements check whether it has a majority element or not

Three approaches are discussed in the solution viz.

  1. Brute Force O(n*n)
  2. Sorting O(n*logn)
  3. Boyer-Moore Vote algorithm O(n)

suhas-kadu avatar Oct 23 '21 14:10 suhas-kadu