MindMap Gallery Algorithm basics and data structures
Algorithm basics and data structure mind map, including algorithm characteristics, recursion and iteration, arrangement and search, basic concepts of data structure, linear structure, etc.
Edited at 2021-11-30 13:24:51Algorithm basics and data structures
Characteristics of algorithms
Definition of algorithm
An algorithm is any well-defined set of computational steps
Basic characteristics of algorithms: finiteness, certainty, feasibility, input, output
Algorithm representation
Representing algorithms in natural language
Advantages are simple
Represent algorithm in pseudo code
Represent algorithm with flow chart
Can clearly indicate the operation process
Use ns diagram to represent the algorithm
Easy to understand design intent
Use PAD diagram to represent the algorithm
Simple
Evaluation of Algorithms
Algorithm evaluation criteria
Correctness, readability, robustness, efficiency
Difficulties in Estimating Algorithm Complexity
Hardware speed, problem size, fairness, programming effort, program quality, compilation quality
Algorithmic complexity
Representation of algorithm time
The time complexity of the algorithm is related to the size of the input data
Algorithm time complexity calculation case
Algorithm space complexity
fixed part, variable part
Recursion and iteration
Recursive algorithm ideas
The concept of recursion
Recursion has the characteristics of self-description and self-reproduction
The definition and method of recursion
Recursive execution is divided into two stages: recursion and backtracking.
recursive termination condition
The function stops when it meets a certain boundary condition
Factorial recursive process analysis
Recursive application
Problems with recursive use
Basic conditions for recursion
Recursive determination
Iterative algorithm ideas
The concept of iteration
Iteration is the use of the original value of the variable to derive the new value of the variable.
Basic concepts of iteration
Determine the iteration model, establish iteration relationships, and control the iteration process
The difference between recursion and iteration
Implementation methods, termination conditions, memory resources, operating efficiency, practicality, algorithm conversion
Applications of recursion and iteration
Use recursive algorithm to generate typing diagram
Arrange and search
Bubble Sort
Basic operations of sorting algorithms
Bubble sort algorithm case analysis
Bubble sort algorithm analysis
insertion sort
How to sort poker cards
Insertion sort algorithm case analysis
Insertion sort algorithm analysis
Quick sort
Case study of fast filming algorithm
Quick sort algorithm analysis
binary search
Binary search algorithm analysis case
Binary search algorithm analysis
Index lookup
subtopic
data structure
basic concept
The development of data structures
Data structure issues in practical work
Data structure definition
The relationship between data elements is called data structure
Type of data structure
Set structure, linear structure, tree structure, and graph structure
linear structure
definition
In practical applications, the forms of linear tables include data structures such as strings, one-dimensional arrays, stacks, queues, and linked lists.
stack
Features: first in, first out
queue
Features: First in, last out
one-way linked list
There is a pointer
tree structure
Basic concepts and characteristics of trees
All problems with hierarchical or inclusive relationships can be described using a tree structure.
Binary tree storage structure
Characteristics of a binary tree: every node except leaves has two subtrees
Binary tree traversal
Tree traversal refers to searching along a certain route and visiting each node in the tree once and only once.
decision tree
Advantages: Simple, easy to understand and intuitive
Disadvantages: May create overly complex rules
Tree search technology
Graphical structure
Basic concepts of graphs
Graph storage structure
The methods of storing graphs mainly use adjacency matrices and adjacency lists.
Breadth-first traversal of the graph
Visit all vertices in the graph from a certain vertex and each vertex is visited only once
File structure
Basic concepts of files
Collections saved on external storage media in a certain format
Logical valence structure of the document
The physical structure of the file
file data structure
b-tree
b tree
Optimization of b-trees
Advantages of b-tree and b-tree