Answer the question
In order to leave comments, you need to log in
New algorithm for finding the most frequent element, is it possible?
I seem to have come up with a new algorithm for finding the most frequent element in an array, requires O(1) memory, runs in O(N) time, and does not depend on whether the element occurs more than N/x times.
UPD. All closed :)
Answer the question
In order to leave comments, you need to log in
0. Get drunk
1. Write tests for the worst and best options
2. Write the code of the method on xs or pluses
3. Go to university with a good teacher
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question