-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
base: main
Are you sure you want to change the base?
Conversation
added and refined some parts. I feel like that this chapter is already pretty well translated.
There was a problem hiding this 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!
en/docs/chapter_searching/summary.md
Outdated
- 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)$. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
- 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
rewritten some parts of the sentence as per Thomas suggested. please note that some parts I re-wrote it a bit differently.
There was a problem hiding this 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.
Added what Ymmma suggested
There was a problem hiding this 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!
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:
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: