Fix #134: Use HashMap O(n) approach for C/Java/Python code#152
Open
Senrian wants to merge 2 commits intoMisterBooo:masterfrom
Open
Fix #134: Use HashMap O(n) approach for C/Java/Python code#152Senrian wants to merge 2 commits intoMisterBooo:masterfrom
Senrian wants to merge 2 commits intoMisterBooo:masterfrom
Conversation
|
你好,你的来信我已收到我会尽快与你取得联系。
此信件自动发送,表示我已收到您的来信!文润个人博客天街雨站www.leewr.com
|
|
邮件已收到,三日内拜读
|
|
Get it!
|
|
您好,您的邮件我已收到,我会尽快阅读邮件内容并及时回复您。 祝好。范韬霖
|
…/Java/Python code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for Issue #134
Problem: The article claims time complexity O(n) (HashMap approach) but the C, Java, and Python implementations use nested loops O(n²).
Solution: Updated all three code implementations to use the HashMap/HashTable approach matching the documented O(n) time complexity.
Changes:
All implementations now correctly achieve O(n) time complexity as documented in the article.