-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 searching_algorithm_revisited.md #1559
base: main
Are you sure you want to change the base?
translation: update searching_algorithm_revisited.md #1559
Conversation
fix typo in original commit
|
||
Searching algorithms can be divided into the following two categories based on their implementation approaches. | ||
Searching algorithms can be divided into the following two categories based on their approach. | ||
|
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.
'Implementation approaches" is redundant (it says the same thing twice). We could also say 'based on their implementation'.
|
||
- **Locating the target element by traversing the data structure**, such as traversals of arrays, linked lists, trees, and graphs, etc. | ||
- **Using the organizational structure of the data or the prior information contained in the data to achieve efficient element search**, such as binary search, hash search, and binary search tree search, etc. | ||
- **Using the organizational structure of the data or existing data to achieve efficient element searches**, such as binary search, hash search, binary search tree search, etc. | ||
|
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.
- 'prior information contained in the data' can be shortened. We could also say 'existing information' instead of 'existing data'.
- 'searches' or we could say 'an efficient element search'
|
||
It is not difficult to notice that these topics have been introduced in previous chapters, so searching algorithms are not unfamiliar to us. In this section, we will revisit searching algorithms from a more systematic perspective. | ||
These topics were introduced in previous chapters, so they are not unfamiliar to us. In this section, we will revisit searching algorithms from a more systematic perspective. | ||
|
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.
- 'it is not difficult to notice' sounds strange in this context (almost pretentious). This is a style suggestion.
- replaced 'searching algorithms' with 'they' because we use it again in the next sentence so it starts to sound repetitive.
- Not suitable for scenarios with frequent additions and deletions, because maintaining an ordered array incurs high overhead. | ||
- Suitable for larger data volumes, with stable performance and a worst-case time complexity of $O(\log n)$. | ||
- However, the data volume cannot be too large, because storing arrays requires contiguous memory space. | ||
- Not suitable for scenarios with frequent additions and deletions, because maintaining an ordered array incurs a lot of overhead. | ||
|
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.
The first bullet point ('Suitable for large data volumes') seems to directly contradict the second bullet point ('The data volume cannot be too large') so it helps to clarify by adding 'However'.
(I imagine taking notes and seeing 'Suitable for large data volumes' so I write that down -> 'Good for large data'. Then I see 'The data volume cannot be too large' so I write that down -> 'Not good for large data'. With 'However' we clarify that there is a balance we need to be aware of.)
@@ -1,48 +1,48 @@ | |||
# Search algorithms revisited | |||
|
|||
<u>Searching algorithms (searching algorithm)</u> are used to search for one or several elements that meet specific criteria in data structures such as arrays, linked lists, trees, or graphs. | |||
<u>Searching algorithms (search algorithms)</u> are used to retrieve one or more elements that meet specific criteria within data structures such as arrays, linked lists, trees, or graphs. | |||
|
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.
- Keep consistency with the title - "Search algorithms revisited"
- We search for an element but then we need to do something with it - "retrieve"
- the "specific criteria" relates to the element, not the data structure - add 'within' to make this clearer
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: