Data structure first, the data structure is a primer to understand knowledge.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.