Directory
- Introduction to Getting started with data structures
- Four categories of data structures
- 1. Collection structure
- 2. Linear structure
- 3. Tree structure
- 4. Diagram structure
- Ii. Introduction to the physical structure
- 1. Memory
- 2. Storage form of data elements
- Iii. Summary
Introduction to data structure four categories of data structure
What we often hear is that, 数据结构 + 算法 = 程序
in our program design, the data structure is essential, then what is the data structure, in a nutshell, is the product of the production of the relationship. Probably not very understanding. Because of our programming process, How the data generated in the program is stored is a data relationship.
Common types of data structures.
集合
线性结构
树结构``图结构
For these structures we can look at the example diagram
1. Collection structure
As shown in the following:
Features: Data that can be placed on the same property. No other data
2. Linear structure
As shown in the following:
Features: Linear structure is a one-to-one relationship
3. Tree structure
As shown in the following:
Characteristics: The relationship of tree structure is one-to-many relationship. That is, hierarchical relationship.
4. Diagram structure
As shown in the following:
Features: Graph structure is a many-to-many relationship. An element can have multiple element links.
Ii. Introduction to the physical structure
According to the physical structure definition, we are actually studying how to store the data elements in the computer's memory.
1. Memory
The memory is mainly for memory, to the hard disk floppy disk. Data organization of external memory such as devices that can be output by peripherals, usually described by file structure
2. Storage form of data elements 1. Sequential storage
Sequential storage is the data element stored in the address contiguous storage unit, the data between the logical relationship and the physical relationship is consistent, for example, array storage.
2. Chain-Store
From sequential storage, we think of the queues in our daily lives. But there are different things to do in the queue, like going to the toilet. So we have no place, so use chained storage.
The chain storage feature is to store the data elements in any storage unit, which can be contiguous or discontinuous. The usual practice is to store pointers to the next address. This way the pointer is used to find the next data position.
They are stored arbitrarily. Address storage is required.
Iii. Summary
Above, mainly is the basic knowledge of data structure, the classification of data structure. And how to store it.
Data structure first, the data structure is a primer to understand knowledge.