mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 04:31:55 +08:00
translation: Capitalize all the headers, list headers and figure captions (#1206)
* Capitalize all the headers, list headers and figure captions * Fix the term "LRU" * Fix the names of source code link in avl_tree.md * Capitalize only first letter for nav trees in mkdocs.yml * Update code comments * Update linked_list.md * Update linked_list.md
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Algorithms are Everywhere
|
||||
# Algorithms are everywhere
|
||||
|
||||
When we hear the word "algorithm," we naturally think of mathematics. However, many algorithms do not involve complex mathematics but rely more on basic logic, which can be seen everywhere in our daily lives.
|
||||
|
||||
@ -33,7 +33,7 @@ This essential skill for elementary students, looking up a dictionary, is actual
|
||||
2. Take out a card from the unordered section and insert it into the correct position in the ordered section; after this, the leftmost two cards are in order.
|
||||
3. Continue to repeat step `2.` until all cards are in order.
|
||||
|
||||

|
||||

|
||||
|
||||
The above method of organizing playing cards is essentially the "Insertion Sort" algorithm, which is very efficient for small datasets. Many programming languages' sorting functions include the insertion sort.
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Introduction to Algorithms
|
||||
# Introduction to algorithms
|
||||
|
||||

|
||||

|
||||
|
||||
!!! abstract
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# What is an Algorithm
|
||||
# What is an algorithm
|
||||
|
||||
## Definition of an Algorithm
|
||||
## Definition of an algorithm
|
||||
|
||||
An "algorithm" is a set of instructions or steps to solve a specific problem within a finite amount of time. It has the following characteristics:
|
||||
|
||||
@ -8,7 +8,7 @@ An "algorithm" is a set of instructions or steps to solve a specific problem wit
|
||||
- The algorithm is feasible, meaning it can be completed within a finite number of steps, time, and memory space.
|
||||
- Each step has a definitive meaning. The output is consistently the same under the same inputs and conditions.
|
||||
|
||||
## Definition of a Data Structure
|
||||
## Definition of a data structure
|
||||
|
||||
A "data structure" is a way of organizing and storing data in a computer, with the following design goals:
|
||||
|
||||
@ -21,7 +21,7 @@ A "data structure" is a way of organizing and storing data in a computer, with t
|
||||
- Compared to arrays, linked lists offer more convenience in data addition and deletion but sacrifice data access speed.
|
||||
- Graphs, compared to linked lists, provide richer logical information but require more memory space.
|
||||
|
||||
## Relationship Between Data Structures and Algorithms
|
||||
## Relationship between data structures and algorithms
|
||||
|
||||
As shown in the figure below, data structures and algorithms are highly related and closely integrated, specifically in the following three aspects:
|
||||
|
||||
@ -37,7 +37,7 @@ Data structures and algorithms can be likened to a set of building blocks, as il
|
||||
|
||||
The detailed correspondence between the two is shown in the table below.
|
||||
|
||||
<p align="center"> Table <id> Comparing Data Structures and Algorithms to Building Blocks </p>
|
||||
<p align="center"> Table <id> Comparing data structures and algorithms to building blocks </p>
|
||||
|
||||
| Data Structures and Algorithms | Building Blocks |
|
||||
| ------------------------------ | --------------------------------------------------------------- |
|
||||
|
||||
Reference in New Issue
Block a user