Skip to content
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

translation: Update chapter_sorting / bubble_sort.md #1646

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Phoenix0415
Copy link
Contributor

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.

Copy link
Contributor

@K3v123 K3v123 left a comment

Choose a reason for hiding this comment

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

looks good to me, thanks for the hardwork!

2. Next, perform a "bubble" on the remaining $n - 1$ elements, **swapping the second largest element to its correct position**.
3. Similarly, after $n - 1$ rounds of "bubbling," **the top $n - 1$ largest elements will be swapped to their correct positions**.
4. The only remaining element is necessarily the smallest and does not require sorting, thus the array sorting is complete.
1. First, perform one “bubble” pass on all $n$ elements, **swapping the largest element to its correct position**.
Copy link
Contributor

Choose a reason for hiding this comment

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

1.I think "bubble" is a technical term which could be used directly. How about update to this: perform "bubble" on n elements.
2.This sentence has grammar error. "...elements, and swap the xxx."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the review and suggestions!

  • I removed “all” before “𝑛 elements” to make the sentence more concise, as you mentioned.
  • I kept the wording:
    1. “First, perform one ‘bubble’ pass”
    2. “Next, perform a pass”
    3. "Continue in this manner; after n-1 such passes,"
    to clarify each iteration (not the entire algorithm), and used the structure “[Do X], [swapping Y]” to show the result of each pass, closely reflecting the original Chinese wording '将...'.

Let me know if you approve of these revisions or have any other thoughts—your feedback is greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants