What is the data structure? What is the relationship between data and structure?
The data structure must first define two things: Data and structure.
Data is a group of meaningful information. Data is used as information units.
Structure is the relationship between information units and information units.
Components are expressed in the most abstract form:
Ing: one-to-one, one-to-many, and many-to-many.
Sequential relationship: A-> B, B->
Data structure is a methodology that constructs information units.
Common data structures include:
One-to-one, (Queue): 1, 2, 3, 4, 5...
Based on the Content orderliness, it can be divided into ordered queues or unordered queues.
It can be divided into one-way and two-way in order.
The ing methods can be divided into location ing, pointer ing, and function ing.
One-to-multiple (tree structure): 1-> (2, 3)-> (4, 5), (6, 7 ))...
Many-to-many (graphical structure): (1, 2)-> (3, 4 )....
Data structure functions:
1. Organize information in a beneficial way.
2. The so-called beneficial is to helpAlgorithmEfficiency (development efficiency and execution efficiency)
3. structure, which may be the information itself
Reasons for converting one structure to another:
1. information may need to be changed
2. The purpose of structure transformation is always to improve the efficiency of common algorithms.