Data Structure Learning notes (1)

Source: Internet
Author: User

Data structure is a basic course of computer science, which has a great influence on our further study and development in programming. And I also recently self-study data structure, so here to record their own in the course of learning this course in the process of some of the important points of knowledge and personal summary, if you can help your memory at the same time can also help others are preparing to learn or are learning this course of the netizens, that would be better. At the same time also hope to see this article of the netizens to the text appeared in the error, I thank you first.

    1. Data Structure Basics

      (1) What is a data structure?

      A data structure is a collection of elements that have a certain connection to each other.

When it comes to data elements, it is necessary to figure out several concepts about the data. respectively:

A. Data: a symbolic representation of an objective transaction. In computer science, it is the general name of the symbols that can be processed by computer programs in the computer.

B. Data elements: The basic unit of data. is usually considered and handled as a whole in the program.

C. Data object: Is a collection of data elements of the same nature. is a subset of the data.

D. Data item: Is the basic unit of the data element. Describes the characteristics of a particular aspect of a data element. is the smallest unit that can no longer be divided.

As I understand it, the above concepts can be likened to: data represents "Everything in the world"; Data objects represent "human beings", data elements represent "individuals", and data items represent "one characteristic of a person".

The interrelationship between elements is called the logical structure.

(2) What are the basic types of logical structure?

There are four basic types: set, linear, tree, graphic or mesh.

(3) What is the form definition of the data structure?

Data_structure= (D,s)

where D is a finite set of data elements, S is a finite set of relationships on D.

2. Data structure representation and storage in a computer

(1) What kinds of storage representations are there in the data structure?

There are 2 kinds of storage representations, one is the storage of data elements, the other is the storage of relationships between data elements.

(2) What are the different ways to store relationships between elements?

There are two ways of storing:

A. Sequential representation--sequential storage--represents the logical relationship between data elements in the relative position of data elements in memory.

B. Non-sequential representation--chained storage--place a pointer to the next data element in each data element to represent the logical relationship between the data elements.

(3) According to the above, what characteristics of each storage mode can we get?

A. Characteristics of sequential storage: the storage address of adjacent data elements in memory is continuous.

B. Characteristics of chained storage: the storage address of adjacent data elements in memory does not require continuous.

Summary: We can assume that the sequential storage structure has random access characteristics, similar to the one-dimensional array in C language. But chained storage does not have the characteristic of random access, in C language, the structure is used to express chain storage.

(4) What are the three components of a data structure?

A. Logical structure;

B. Storage structure;

C. Data manipulation;

3. What is the difference between the data structure and the type?

A data type is a collection of values and a set of operations that are defined in that set of values.

The data structure is different from the data type and also differs from the data object, which not only describes the data object of the data type, but also describes the interrelationships between the elements of the data object.


Data Structure Learning notes (1)

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.