leetcode
leetcode copied to clipboard
Add optimized solution with O(n) - javascript/0347-top-k-frequent-elements.js
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)
- File(s) Modified: javascript/0347-top-k-frequent-elements.js
- Language(s) Used: javascript
- Submission URL: https://leetcode.com/problems/top-k-frequent-elements/submissions/940823835/
Important
Please make sure the file name is lowercase and a duplicate file does not already exist before merging.
Another solution was added
The 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 Language(s) Used: javascript Submission URL: https://leetcode.com/problems/longest-repeating-character-replacement/submissions/941797943/
Important Please make sure the file name is lowercase and a duplicate file does not already exist before merging.