- Notifications
You must be signed in to change notification settings - Fork2.4k
Add optimized solution with O(n) - javascript/0347-top-k-frequent-elements.js#2439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The changes include a new solution that does the job in O(n) as described in the video without sorting the frequency array taking O(logN)
Add another solution with hashmap instead of arrays for storing the count
Another solution was addedThe changes include a new solution that does the job using hashmaps as described in the video. File(s) Modified: javascript/0424-longest-repeating-character-replacement.js Important |
Uh oh!
There was an error while loading.Please reload this page.
The changes include a new solution that does the job in O(n) as described in the video without sorting the frequency array taking O(logN)
Important
Please make sure the file name is lowercase and a duplicate file does not already exist before merging.