avinash201199 / avinash201199/DSA-Questions
Majority Element in an [JAVA]
Open
hacktoberfest
- Dominant language
- C++
- Stars
- 88
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
**Problem Description**
We need to find the majority element if it exists in an array. Majority element is an element which occurs for more than n/2 times in an array where n is the length of the array.
**Expected Time Complexity**
O(n)
**Expected Space Complexity**
O(1)
**Sample Testcase**
Input: 10,5,8,10,10,10,7,10
Output: 10
@avinash201199 can you please assign this to me.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.