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: Update summary.md #1549

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

Conversation

K3v123
Copy link
Contributor

@K3v123 K3v123 commented Nov 9, 2024

added and refined some parts.
I feel like that this chapter is already pretty well translated.

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.

added and refined some parts.
I feel like that this chapter is already pretty well translated.
Copy link
Contributor

@thomasq0 thomasq0 left a comment

Choose a reason for hiding this comment

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

Here are my review comments. Thanks for the effort!

- Brute force search locates data by traversing the data structure. Linear search is suitable for arrays and linked lists, while breadth-first search and depth-first search are suitable for graphs and trees. These algorithms are highly versatile, requiring no preprocessing of data, but have a higher time complexity of $O(n)$.
- Hash search, tree search, and binary search are efficient searching methods, capable of quickly locating target elements in specific data structures. These algorithms are highly efficient, with time complexities reaching $O(\log n)$ or even $O(1)$, but they usually require additional data structures.
- In practice, we need to analyze factors such as data volume, search performance requirements, data query and update frequencies, etc., to choose the appropriate search method.
- Brute force search locates data by traversing the data structure. Linear search is suitable for arrays and linked lists, while breadth-first search (BFS) and depth-first search (DFS) are suitable for graphs and trees. These algorithms are highly versatile, requiring no preprocessing of data, but have a higher time complexity of $O(n)$.
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand this translation tries to stick to the Chinese version. However, I feel like it is missing a statement that points out there are different algorithms that may be applied to certain types of data structure. I would propose rewriting the first sentence to:

Brute force search may be required to locate the entry from an unordered dataset. Depending on the data structure, different search strategies or algorithms may be used to traversing the data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Thomas
thank you for the suggestions.
I re-written this a bit differently. please let me know if this version is ok?
thanks

en/docs/chapter_searching/summary.md Outdated Show resolved Hide resolved
en/docs/chapter_searching/summary.md Outdated Show resolved Hide resolved
- In practice, we need to analyze factors such as data volume, search performance requirements, data query and update frequencies, etc., to choose the appropriate search method.
- Brute force search locates data by traversing the data structure. Linear search is suitable for arrays and linked lists, while breadth-first search (BFS) and depth-first search (DFS) are suitable for graphs and trees. These algorithms are highly versatile, requiring no preprocessing of data, but have a higher time complexity of $O(n)$.
- Hash search, tree search, and binary search are efficient searching methods that quickly locate target elements within specific data structures. These algorithms are highly efficient, with time complexities reaching $O(\log n)$ or even $O(1)$, but they usually require additional data structures.
- In practice, we need to analyze factors such as data volume, search performance requirements, data query and update frequencies, etc., to select an appropriate search method.
- Linear search is suitable for small or frequently updated data; binary search is suitable for large, sorted data; hash search is suitable for scenarios requiring high query efficiency without the need for range queries; tree search is appropriate for large dynamic data that needs to maintain order and support range queries.
Copy link
Contributor

Choose a reason for hiding this comment

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

Proposal of rewriting this paragraph:

Linear search is preferred on small or volatile data, whereas binary search performs better if we are dealing with large and stable data. Hash search is particularly useful when high efficiency is required without the need to cater for range queries. In case order is crucial for a large volume of dynamic data that supports range queries, tree search might be the best choice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I re-written this a bit differently. please let me know if this version is ok?
thanks

en/docs/chapter_searching/summary.md Outdated Show resolved Hide resolved
rewritten some parts of the sentence as per Thomas suggested.
please note that some parts I re-wrote it a bit differently.
Copy link

@ymmmas ymmmas left a comment

Choose a reason for hiding this comment

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

Great work on the PR, I have provided my review comments below.

en/docs/chapter_searching/summary.md Outdated Show resolved Hide resolved
en/docs/chapter_searching/summary.md Outdated Show resolved Hide resolved
en/docs/chapter_searching/summary.md Outdated Show resolved Hide resolved
Added what Ymmma suggested
Copy link

@ymmmas ymmmas 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 your work!

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.

3 participants