MindMap Gallery Data Structures and Algorithms
Computer secondary data structure and algorithm mind map sharing! The figure below clearly sorts out the basic concepts of algorithms, data structures, linear tables and their sequential storage structures, stacks and queues, linear linked lists, etc.! Hope it helps my friends!
Edited at 2019-07-28 08:28:27Avatar 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 Structures and Algorithms
algorithm
Basic concepts of algorithms
Concept: An algorithm is a series of clear instructions for solving a problem
4 basic characteristics: feasibility, certainty, finiteness, and having sufficient information
two basic elements
Calculations and operations on data objects
arithmetic operations
logic operation
relational operations
data transmission
The control structure of the algorithm (the order of execution between operations)
Tools for describing algorithms
The same algorithm is implemented in different languages, or compiled with different compilers, or run on different computers, and the efficiency is different.
traditional flowchart
N-S structured flow chart
algorithm description language
Basic methods of design: enumeration, induction, recursion, halved recursion technique, backtracking
algorithm complexity
Time complexity of an algorithm: the amount of computational effort required to execute the algorithm
scale of problem
The status of the data to be processed
Algorithm space complexity: the memory space required to execute the algorithm
The space occupied by the algorithm program
The storage space occupied by the input initial data
Additional space required during each process of algorithm execution
Unit of work during algorithm execution
Additional storage required for certain data structures
Basic concepts of data structures
A data structure is a collection of related data elements, that is, a data organization form.
logical structure
Reflect the logical relationship between data elements
storage structure
The storage form of the logical structure of data in computer storage space
sequential storage
Index storage
Hash storage
chain storage
Operations on various data structures
data
data element
data object
logical structure of data
A collection of data elements D
The relationship on the set B=(D,R)
According to the complexity of the relationship between each element
nonlinear structure
Whether an empty data structure is linear or non-linear depends on the specific situation.
Linear table and its sequential storage structure
Basic concepts of linear tables
Linear table (linear structure) is the simplest and most commonly used data structure.
Sequential storage structure of linear table
The storage space occupied by the elements must be contiguous
The positions of elements in the storage space are stored in logical order.
Insertion operation of linear table
In the worst case, the first one is inserted and the others need to be moved.
Linear table deletion operation
stacks and queues
Stack and its basic operations
basic concept
The stack is a special linear table. Insertion and deletion operations are performed on a section of the linear table, first in, last out, last in, first out.
Frequent exams
Top of stack: a section that allows insertion and deletion
Bottom of the stack: the other end of the stack
Empty stack: a stack with no elements in the stack
Features
The top element of the stack is the first element to be inserted and the last element to be deleted.
The stack has a memory function
Under the sequential storage structure, insertion and deletion operations on the stack do not require moving other data elements in the table.
The top pointer on the stack dynamically reflects the changes in the elements in the stack
Sequential storage and operations
push operation
Insert a new element at the top of the stack: stack pointer 1. The new element is inserted into the position pointed by the top pointer. When the top pointer points to the end, it is full and an overflow error occurs.
Pop operation
Read top of stack operation
Queues and their basic operations
basic concept
Tail of the queue: the end that allows insertion
linear structure
There is one and only one root node, and each node has at most one direct predecessor and one direct successor non-empty data structure (precedent and successor).
Heading: the end that allows deletion
Circular queue and its operations
Enqueue operation
Add a new element to the end of the circular queue
Overflow: The queue is not empty, s=1, the tail pointer of the queue is equal to the head pointer of the queue, the queue is full, and the queue cannot be added to the queue for operation.
Exit operation
Exits an element from the head of the queue and assigns it to the specified variable
Underflow: The queue is empty s=0, and the dequeue operation cannot be performed.
linear linked list
Single linked list/linear linked list
There is only one pointer to store the next element
chain storage method
data field
Store data element value
pointer field
Store pointers (pointers are used to point to migrations or afterware)
Trees and Binary Trees
A tree can have an infinite number of nodes, but a binary tree can have at most two.
Basic concepts of trees
Trees are simple non-linear structures
Root: There is one and only one node with no predecessor
Parent node: Each node has only one antecedent, and there is only one node without antecedent.
Child node: Each node can have multiple successors. Nodes without sequelae are called leaf nodes.
Degree of tree: the maximum degree of all nodes
Tree depth: the maximum level of the tree
The definition of binary tree and its basic properties
Binary tree definition
Nonlinear structure, limited node set
complete binary tree
full binary tree
( )
Can be empty. An empty binary tree has no nodes. A non-empty binary tree has one and only one root node.
Each node can have up to two subtrees, a left subtree and a right subtree.
Basic properties of binary trees
In the traversal of a binary tree, whether it is pre-order traversal, in-order traversal or post-order traversal, the leaf nodes of the binary tree take priority.
There are at most 2k-1 nodes on the kth level of the binary tree
A binary tree of depth m has at most 2m-1 nodes.
For any binary tree, there is always one more node (leaf node) with degree 0 than node with degree 2.
A complete binary tree with n nodes has a depth of at least [log2n] (integer part) 1
Full binary tree and complete binary tree
full binary tree
Except for the last level, all nodes in each level have two child nodes.
The number of nodes in each layer reaches the maximum, and the kth layer has 2k-1 nodes.
A binary tree with depth m has 2m-1 nodes.
complete binary tree
Except for the last layer, the number of nodes in each layer reaches the maximum
On the last layer, only a few nodes on the right are missing.
Leaf nodes can only appear on the two largest levels. For any node, the maximum level of the descendant node of its right branch is p, then the maximum level of the descendant node of its left branch is p or p 1
Binary tree traversal
Principle: left first, then right
Classification
Preorder traversal
Root node→left subtree→right subtree
inorder traversal
Left subtree→root node→right subtree
Postorder traversal
Left subtree→right subtree→root node
Find technology
sequential search
Two situations where only sequential search can be used
A linear list is an unordered list
Linked stored ordered list
binary search
Applicable only to sequentially stored, non-decreasing ordered lists
Find method
Worst case search log2n times
sorting techniques
commutative sorting
bubble sort
The worst case number of comparisons is n(n-1)/2 times
Average execution time o(n2)
quicksort
o(nlog2n)
Take any element in the sequence to be sorted as the basis
Divided into two subsequences, left and right
The sorting code of the left subsequence is ≤ the sorting code of the reference element
The sorting code of the right subsequence is ≥ the sorting code of the base element
Then sort until the entire sequence is in order