Skip to content

translation: Update replace_linear_by_hashing.md #1551

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

K3v123
Copy link
Contributor

@K3v123 K3v123 commented Nov 10, 2024

refined some parts of it.

If this pull request (PR) pertains to Chinese-to-English translation, please confirm that you have read the contribution guidelines and complete the checklist below:

  • This PR represents the translation of a single, complete document, or contains only bug fixes.
  • The translation accurately conveys the original meaning and intent of the Chinese version. If deviations exist, I have provided explanatory comments to clarify the reasons.

If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist:

  • I have thoroughly reviewed the code, focusing on its formatting, comments, indentation, and file headers.
  • I have confirmed that the code execution outputs are consistent with those produced by the reference code (Python or Java).
  • The code is designed to be compatible on standard operating systems, including Windows, macOS, and Ubuntu.

@@ -18,11 +18,11 @@ The code is shown below:
[file]{two_sum}-[class]{}-[func]{two_sum_brute_force}
```

This method has a time complexity of $O(n^2)$ and a space complexity of $O(1)$, which is very time-consuming with large data volumes.
This method has a time complexity of $O(n^2)$ and a space complexity of $O(1)$, which becomes very time-consuming with large data volumes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

becomes => can be

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -42,6 +42,6 @@ The implementation code is shown below, requiring only a single loop:
[file]{two_sum}-[class]{}-[func]{two_sum_hash_table}
```

This method reduces the time complexity from $O(n^2)$ to $O(n)$ by using hash search, greatly improving the running efficiency.
This method reduces the time complexity from $O(n^2)$ to $O(n)$ by using hash search, significantly improving the running efficiency.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

improving the running efficiency => enhancing runtime efficiency

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@krahets krahets merged commit b6939da into krahets:main Dec 4, 2024
1 check passed
@krahets krahets added translation English translation documents documents-related labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documents documents-related translation English translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants