mirror of
https://github.com/krahets/hello-algo.git
synced 2026-09-01 04:47:12 +00:00
Translate all code to English (#1836)
* Review the EN heading format. * Fix pythontutor headings. * Fix pythontutor headings. * bug fixes * Fix headings in **/summary.md * Revisit the CN-to-EN translation for Python code using Claude-4.5 * Revisit the CN-to-EN translation for Java code using Claude-4.5 * Revisit the CN-to-EN translation for Cpp code using Claude-4.5. * Fix the dictionary. * Fix cpp code translation for the multipart strings. * Translate Go code to English. * Update workflows to test EN code. * Add EN translation for C. * Add EN translation for CSharp. * Add EN translation for Swift. * Trigger the CI check. * Revert. * Update en/hash_map.md * Add the EN version of Dart code. * Add the EN version of Kotlin code. * Add missing code files. * Add the EN version of JavaScript code. * Add the EN version of TypeScript code. * Fix the workflows. * Add the EN version of Ruby code. * Add the EN version of Rust code. * Update the CI check for the English version code. * Update Python CI check. * Fix cmakelists for en/C code. * Fix Ruby comments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Searching algorithms revisited
|
||||
# Searching Algorithms Revisited
|
||||
|
||||
<u>Searching algorithms</u> are used to search for one or a group of elements that meet specific conditions in data structures (such as arrays, linked lists, trees, or graphs).
|
||||
|
||||
@@ -9,7 +9,7 @@ Searching algorithms can be divided into the following two categories based on t
|
||||
|
||||
It's not hard to see that these topics have all been covered in previous chapters, so searching algorithms are not unfamiliar to us. In this section, we will approach from a more systematic perspective and re-examine searching algorithms.
|
||||
|
||||
## Brute-force search
|
||||
## Brute-Force Search
|
||||
|
||||
Brute-force search locates target elements by traversing each element of the data structure.
|
||||
|
||||
@@ -20,7 +20,7 @@ The advantage of brute-force search is that it is simple and has good generality
|
||||
|
||||
However, **the time complexity of such algorithms is $O(n)$**, where $n$ is the number of elements, so performance is poor when dealing with large amounts of data.
|
||||
|
||||
## Adaptive search
|
||||
## Adaptive Search
|
||||
|
||||
Adaptive search utilizes the unique properties of data (such as orderliness) to optimize the search process, thereby locating target elements more efficiently.
|
||||
|
||||
@@ -36,7 +36,7 @@ However, **using these algorithms often requires data preprocessing**. For examp
|
||||
|
||||
Adaptive search algorithms are often called lookup algorithms, **mainly used to quickly retrieve target elements in specific data structures**.
|
||||
|
||||
## Search method selection
|
||||
## Search Method Selection
|
||||
|
||||
Given a dataset of size $n$, we can use linear search, binary search, tree search, hash-based search, and other methods to search for the target element. The working principles of each method are shown in the figure below.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user