Skip to content

abubakerKhaled/algorithm_task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

algorithm_task

Majority Element

  • Find the Majority element of an array A[1 ... n]: An array is said to have a majority
  • element if more than half of its entries are the same.
  • Example :
  • Input: {3, 3, 4, 2, 4, 4, 2, 4, 4}
  • Output: 4
  • Explanation: The frequency of 4 is 5 which is greater than the half of the size
  • of the array size.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages