mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-31 04:17:14 +00:00
build
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
comments: true
|
||||
---
|
||||
|
||||
# 1.2 What is an Algorithm
|
||||
# 1.2 What is an algorithm
|
||||
|
||||
## 1.2.1 Definition of an Algorithm
|
||||
## 1.2.1 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:
|
||||
|
||||
@@ -12,7 +12,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.
|
||||
|
||||
## 1.2.2 Definition of a Data Structure
|
||||
## 1.2.2 Definition of a data structure
|
||||
|
||||
A "data structure" is a way of organizing and storing data in a computer, with the following design goals:
|
||||
|
||||
@@ -25,7 +25,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.
|
||||
|
||||
## 1.2.3 Relationship Between Data Structures and Algorithms
|
||||
## 1.2.3 Relationship between data structures and algorithms
|
||||
|
||||
As shown in the Figure 1-4 , data structures and algorithms are highly related and closely integrated, specifically in the following three aspects:
|
||||
|
||||
@@ -45,7 +45,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 1-1 .
|
||||
|
||||
<p align="center"> Table 1-1 Comparing Data Structures and Algorithms to Building Blocks </p>
|
||||
<p align="center"> Table 1-1 Comparing data structures and algorithms to building blocks </p>
|
||||
|
||||
<div class="center-table" markdown>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user