DS-Algo-Point
DS-Algo-Point copied to clipboard
Majority Element in O(1) Space
🚀 Feature
Problem -To find the majority element in an array if there's one (in constant Space) I'll try to solve it in C++ using Moore's voting technique
Have you read the Contribution Guidelines?
Yes
Pitch
This is one of the most commonly asked interview problems and a pretty interesting one. Usually, it can be solved easily using a map or dictionary by storing the frequency, but solving it in constant space is tricky.
Assignees
@Arihant416 - C++ @satwik-chowdary - C @ayushpattnaik - Java @Ritika0126 - Python
Kindly assign this problem to me, I'd like to contribute
@Arihant416 - C++ Assigned
Assign me this for java
@sukritishah15 done ma'am kindly review pr #489
I will do it in C. Pls assign it to me
@ayushpattnaik - Java @satwik-chowdary - C Assigned
@arnav-roy @sukritishah15 kindly review the code and merge the PR
Kindly assign the problem to me in Python, I'd like to contribute.
@Ritika0126 - Python Assigned.
@Arihant416 Hi Arihant, we have kept this issue open for other languages. It is recommended that we do not close any issues without the approval of present maintainers. Thank you!
Apologies @sukritishah15 I'll take care of it moving forward. Thanks for letting me know.