introduce

<> Basic information of data structure

data : It is the symbol of objective things , It is the general name of all the symbols that can be input into the computer and processed by the computer program . as : character string , Real integer ....
data elements : It is the basic unit of data , In the computer, it is usually considered and processed as a whole . Such as the information of everyone who makes up the address book , Data elements can describe an object completely .
data item : It's what makes up the data elements , Having independent significance , The smallest indivisible unit ( in other words , A data element consists of two data items
). as , Every student in the address book is a data element , and , Describe the name of the student , Gender , Age, etc , They are all data items of students .
data object : A collection of data elements of the same nature , It's a subset of the data . As long as the data elements in a set have the same properties , The collection can be a data object . as , Sum of integer sets , Is an integer data object .

<> data structure

What is it?

data structure : Is a collection of data elements that have one or more specific relationships with each other ( Or rather , The data structure is a band “ Certain structure ” A collection of data elements for ,“ structure ” It refers to the relationship between data elements )

data structure
Including logical structure and storage structure

<> Logical structure

Logical structure describes data from logical relationship , It has nothing to do with the storage of data , It's computer independent ( It's an imaginary data model )

There are two elements in the logical structure of data :1, data elements ;2, relationship
Data element means that it can be treated and considered as a whole by computer .
The relationship refers to the logical relationship between data elements

There are usually the following 4 Class basic structure
1, Set structure
Data elements belong to the same set , Nothing else ( Each data element has the same property )

for example : When applying set structure , Each class can be a collection , The students in each class are data elements , The students in each class are human , But each student's data items are different . Compared with each class, there are two sets .
2, linear structure
There is only one-to-one relationship between data elements .

for example : Statistics of students' enrollment information is arranged and stored according to their enrollment time .
To find out about a student , Only according to the time relationship between each other , To traverse , Go for two , Find out .
3, Tree structure
There is a one to many relationship between data elements .

for example : Six departments of emperor management in ancient feudal system , The sixth part is in charge of each yamen organization ....
4, Graph structure or network structure
The relationship between data elements is many to many .

To find an element, there can be multiple paths or methods .

Logic structure is divided into linear structure and nonlinear structure , above 4 All the basic structures are nonlinear
Look at the chart below , Enhance memory , Clear your mind .

<> storage structure

The storage of data object in computer is the storage structure of data , It's also a physical structure , To map to physical memory in the computer . The data object is stored in the computer to store the data elements , But also to store the logical relationship between the elements .
There are two ways of storage in a computer : Sequential storage and chain storage .

Sequential storage structure
The logical relationship between data elements is represented by the relative position of elements in memory .
That is equivalent to , Store in memory by address in turn .
for example : array

Chain storage structure
All elements in turn stored in a continuous storage space , The chain storage structure does not need to occupy a whole storage space , But use pointers to indicate the relationship between data elements . for example : Linked list .

<> Abstract data type

According to practical problems , User defined , Data model for solving application problems , And in this model is a series of operations .
for example : Structure type created with structure .
In case of error , Please correct me
I'm not good enough at the moment , I don't know much about abstract data types at present , We'll make it up later .

Technology