MindMap Gallery data structure
Software engineering professional course, data structure mind map notes.
Edited at 2022-03-02 17:09:06Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
data structure
一、 0Overview
二、 linear table
Sequence table
advantage
Random access, even if the first node is lost, other elements can be found
shortcoming
Insertion and deletion are not efficient
merge
Algorithm 2.2
Time complexity is proportional to table length
insert delete
2.4 2.5
Time complexity O(n)
linked list
Advantages and Disadvantages Opposite of Sequence List
Two ways to create a new table
Use to create a new table in the same order as the original one, use tail insertion, otherwise use head insertion.
Head insertion method
Insert into the first one after L
tail insertion method
Insert to the end of the table
special table
circular linked list
Tail pointer points to head pointer
Doubly linked list
Each node has two pointers, one pointing forward and one pointing backward.
When inserting and deleting, two pointers of a node need to be changed.
Two-way loop
ginseng
application
Representation and addition of polynomials of one variable
Three fields, coefficient, exponent, pointer
三、 stacks and queues
Usage
When you encounter useful but temporarily unused information, you can save it first. Order of use and order of storage
Same, use queue
Instead use stack
commonality
Access from the middle is never allowed
The tail pointer has two points, that is, pointing to the last element or pointing above it.
stack
n elements pushed into the stack in a certain order, there are several Catalan pop situations, and this situation does not exist: when the second element after an element is popped off the stack, and the first element after it is not popped off the stack, this element is popped off the stack. stack. That is, if 123 is pushed onto the stack, 312 will never be popped off the stack.
Cattelan number, (2n)!÷(n!n!(n+1))
application
Number system conversion
Expression evaluation
suffix
Maze solving
It can be assumed that the outermost circle is filled with walls
bracket matching
line editing program
Stack and recursion
The working method of recursion is last in first out
Recursive writing is simple, but not efficient
and non-recursive can be converted into each other
Writing method
recursive algorithm
recursive exit
queue
四、 Find
Overview
definition
lookup table
static
dynamic
operate
Check if there are many
Retrieve various attributes
Search collectively
insert
delete
summary
Keywords
host
Uniquely identifies a record (student number)
Second-rate
(gender)
ASL average search length
∑Pi×Ci C is the number of comparisons when finding the element
static lookup table
Sequential storage of unordered lists
sentinel
advantage
Simple and widely applicable
shortcoming
Large ASL, low efficiency
ordered list
Sequential storage key value in order
half search
binary decision tree
That is, the root node is the data pointed to by mid.
Index sequential search (blocked search)
direction chart
That is, the sequence table is divided into blocks, and the index table stores the maximum value of each block. The starting position of the big keyword and the first keyword, the index The table is also an ordered list
Find
sequential search
half search
dynamic lookup table
Binary sorting tree
Small on the left, big on the right or big on the left and small on the right
balanced binary tree
五、 picture
concept
vertex
adjacent point
Degree TD
degree
Out degree 0D
Indegree ID
path
path length
simple path
loop
simple loop
arc
picture
directed graph
Strongly connected graph
There are directed paths and they are mutually reachable.
Strongly connected component
Weakly connected graph
Undirected graph
connected graph
Any two connected
spanning tree
minimally connected subgraph
Does not form a loop
Remove a disconnected line
No
connected components
That is, a maximally connected subgraph.
generate forest
subplot
net
rights of each side
Basic operations
Create and destroy
Vertex
position
Related to storage structure
value
Assignment
insert delete
Also delete arcs
adjacent point
first adjacent point
Related to storage order
next neighbor
arc
add delete
Traverse
depth first
breadth first
storage
array (matrix)
Don't discuss yourself
All 0s on the diagonal
Undirected graph
Symmetric matrix
adjacency list
One-dimensional array (vertex) & linked list (arc)
Undirected graph
2k nodes
A
B
C
D
E
Traverse
depth first
connected graph
Test points
Write storage structure
Write traversal sequence
application
minimum spanning tree
Minimum connectivity cost problem
Prim's algorithm
六、 sort
definition
Sort by keywords in a certain order
Internal sorting
Analysis of Algorithms
time complexity
Compare
subtopic
move
related to initial position
space complexity
insertion sort
insert directly
Find
move back
insert
evaluate
Space O(丨)
time
orderly
Cmin
n-1
Mmin
0
Reverse order
Cmax
(n十4) (n-Ⅰ)÷2
Mmax
(n十4) (n-Ⅰ)÷2
Insert in half
half search
move back
insert
Ensure stability
evaluate
Space O(丨)
time
orderly
Mmin
0
Reverse order
Mmax
(n十4) (n-Ⅰ)÷2
Hill Sort Shrinking Incremental Sort
Macro adjustment first, then micro adjustment
Note the difference between one-pass sorting and direct insertion
Its analysis is very complex
swap sort
Bubble Sort
There are many algorithms
evaluate
Space O(丨)
time
orderly
Cmin
n-1
Mmin
0
Reverse order
Cmax
n(n-Ⅰ)÷2
Mmax
3n(n-Ⅰ)÷2
Quick sort
Set up a pivot and move the smaller one to the left and the larger one to the right.
The more orderly the slower
perform preprocessing
unstable
selection sort
Simple selection sort
evaluate
Space O(丨)
time
orderly
Cmin
n(n-Ⅰ)÷2
Mmin
0
Reverse order
Cmax
n(n-Ⅰ)÷2
Mmax
3n(n-Ⅰ)÷2
unstable
Heap sort
evaluate
Space O1
TimeOnlog2↓n
n-1) (log2↓n 1)
unstable
merge sort
subtopic
Other sorting
Radix sort
Summarize
time
O(nlog2↓n)
fast
merge
heap
external sort
Internal and external memory information exchanges multiple times
七、 Trees and Binary Trees
Recursive traversal
Tree
basic definition
subtopic
the term
Spend
The number of white subtrees a node has
degree of tree
The maximum value of the node degree
Find the nodes of the tree
Nodes/leaf nodes with degree 0
Total number of nodes n=n0 n1 n2 Total number of branches B=n-1 B=n1 2*n2+ Leaf node n0=1 n2 2*n3
Binary tree
definition
subtopic
The order cannot be reversed arbitrarily
complete binary tree
full binary tree
Find nodes
Even number has 1 node with degree 1
Divide the total by 2
For an even number, there are n/2 -1 nodes with degree 2
odd n/2
The rest are those with degree 0
nature
There are at most 2^(n-1) nodes in the i-th level of the binary tree
A full binary tree has 2^k-1 nodes
If the number of leaf nodes is n and the number of nodes with degree 2 is m, then n=m 1
4
5
1
2
3
storage
Linear
Fill it up with 〇 first, starting from the first level, from left to right, if you have it, save it, if there is no 〇 Right now 1A 2 B C 3 D E F ABCDE〇F〇0〇〇
chain
Three data
Left and right pointer data
Four data
leftleft parent pointer data
Traverse a binary tree
First
Around the root
The first one is A, the last one is the bottom right
middle
left root right
The first one is the bottom left, the last one is the bottom right
back
left and right roots
The first one is the bottom left, and the last one is A
Find the depth and number of nodes
clue binary tree
You must first traverse the binary tree
Use airspace to place the predecessor and successor of a node
Let the child's node be positive and the clue be negative to distinguish
trees and forest
definition
A collection of trees that is not empty
tree storage
Parent representation, two-dimensional array itself and parents
Child representation, two-dimensional array, multiple linked lists, data, stores pointers to (linked lists of all children)
Child brother representation (binary tree representation)
Conversion to Binary Tree
The first tree is the root Put the child on the left Brother on the right
Traverse
Tree
successively
forest
First hit
Binary tree
Later, first, middle
correspond
Huffman tree
definition
path length
The path length of the tree k
The weighted path length of the tree WPL=∑Wk W is the weight, only the leaf nodes are calculated
Huffman algorithm
Huffman coding
from head to root
from root to head
Apply for pointer vector space
Apply for temporary code storage space
put closing mark
Start coding
Find the parent node
The right child of the parent node is 1 and the left child is 0
Make yourself the parent node
until the root node
After editing, let the pointer record
Make up the next one
free temporary space
八、 Arrays and generalized tables
array
Main algorithm
Address calculation
Find the address of the element in row i and column j in different matrices
Storage method
low bid
i row j column
high subscript
Matrix compression
in principle
Save less, don’t save 0
Reduce meaningless operations
Easy to operate
special matrix
Symmetric matrix
triangular matrix
diagonal matrix
sparse matrix
triple transpose
Find the smallest j in the original array, then the smallest i, exchange ij and put it into the new group
generalized table
The elements in the table can be arrays
C is for search M is for mobile
The core is drawing