MindMap Gallery Data Structure Chapter 1 - Introduction
Chapter 1 of "Data Structure" - Introduction knowledge review, including the basic concepts of data structure, algorithms and algorithm evaluation.
Edited at 2022-11-23 16:05:51Avatar 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!
introduction
Basic concepts of data structures
1. Basic concepts and terminology
data
The carrier of information, the number that describes the attributes of objective things
data element
The basic unit of data, consisting of several data items
Data item: the smallest unit that constitutes a data element
data object
A collection of data elements with the same properties
type of data
Atomic type
structure type
abstract data type
Abstract data organization and operations related to it
data structure
A collection of data elements that have one or more specific relationships with each other
2. Three elements of data structure
Logical structure: the logical relationships between data elements
linear structure
gather
tree structure
Graphical structure (mesh structure)
Storage structure: the representation of the data structure in the computer (also called the image), also called the physical structure
Sequential storage: Store logically adjacent elements in physically adjacent storage units.
Advantages: Random access can be achieved and takes up less storage space
Disadvantages: Only an adjacent block of storage units can be used, which may cause external fragmentation
Chained storage: represents the logical relationship between elements with the help of pointers indicating the storage addresses of elements.
Advantages: No fragmentation, full use of all storage units
Disadvantages: Pointers take up extra space and can only achieve sequential access.
Index storage: While storing element information, additional index tables are also created.
Advantages: fast retrieval speed
Disadvantages: The index table takes up extra space; when adding or deleting data, the index table needs to be modified, which is more time-consuming.
Hash storage (hash storage): directly calculate the storage address of the element based on the keyword of the element
Advantages: retrieval, adding and deleting nodes are all very fast
Disadvantages: If the hash function is not good, element storage unit conflicts may occur, causing additional time and space overhead.
Data operations
Definition of operations
For the logical structure, point out the function of the operation
Implementation of operations
For the storage structure, point out the specific operation steps of the operation
Algorithms and Algorithm Evaluation
concept
Definition: An algorithm is a description of the steps to solve a specific problem and is a finite sequence of instructions.
feature
Finiteness
certainty
feasibility
enter
output
Target
correctness
readability
Robustness
Efficiency and low storage requirements
A measure of algorithm efficiency
time complexity
Basic formula:
T(n)——The sum of the frequencies of all statements in the algorithm
f(n)——the frequency of basic operations in the algorithm
O——Order of magnitude
Formula definition: If T(n) and f(n) are two functions defined on the set of positive integers, then there are positive constants C and n0, such that when n>=n0, both satisfy 0=<T(n) =<Cf(n)
Classification
Worst time complexity
average time complexity
best time complexity
Arithmetic rules
a. Addition rule
b. multiplication rule
Common asymptotic time complexity
space complexity
Definition: The storage space consumed by the algorithm
formula:
The algorithm works in place means that the auxiliary space required by the algorithm is constant, that is, O(1)