DS-Algo-Point icon indicating copy to clipboard operation
DS-Algo-Point copied to clipboard

Majority Element in O(1) Space

Open Arihant416 opened this issue 4 years ago • 11 comments

🚀 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

Arihant416 avatar Oct 05 '20 01:10 Arihant416

Kindly assign this problem to me, I'd like to contribute

Arihant416 avatar Oct 05 '20 01:10 Arihant416

@Arihant416 - C++ Assigned

sukritishah15 avatar Oct 05 '20 05:10 sukritishah15

Assign me this for java

ayushpattnaik avatar Oct 05 '20 05:10 ayushpattnaik

@sukritishah15 done ma'am kindly review pr #489

Arihant416 avatar Oct 05 '20 06:10 Arihant416

I will do it in C. Pls assign it to me

satwik-chowdary avatar Oct 05 '20 07:10 satwik-chowdary

@ayushpattnaik - Java @satwik-chowdary - C Assigned

arnav-roy avatar Oct 05 '20 07:10 arnav-roy

@arnav-roy @sukritishah15 kindly review the code and merge the PR

ayushpattnaik avatar Oct 05 '20 09:10 ayushpattnaik

Kindly assign the problem to me in Python, I'd like to contribute.

Ritika0126 avatar Oct 05 '20 17:10 Ritika0126

@Ritika0126 - Python Assigned.

arnav-roy avatar Oct 05 '20 19:10 arnav-roy

@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!

sukritishah15 avatar Jul 06 '22 06:07 sukritishah15

Apologies @sukritishah15 I'll take care of it moving forward. Thanks for letting me know.

Arihant416 avatar Jul 06 '22 06:07 Arihant416