Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
aakhtar3 merged 3 commits intoneetcode-gh:mainfromtayyabferozi:main
Jul 2, 2023

Conversation

tayyabferozi
Copy link
Contributor

@tayyabferozitayyabferozi commentedApr 27, 2023
edited
Loading

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.

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
@tayyabferozi
Copy link
ContributorAuthor

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.

@aakhtar3aakhtar3 merged commitc1aaff3 intoneetcode-gh:mainJul 2, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@aakhtar3aakhtar3aakhtar3 approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@tayyabferozi@aakhtar3

[8]ページ先頭

©2009-2025 Movatter.jp