Basic concepts and three elements of data structure

Basic concepts and three elements of data structure

Basic concepts of data structure

Insert picture description here

Data : The carrier of information is a collection of numbers, characters, and all symbols (binary 0s and 1s) that can be input into a computer and recognized and processed by a computer program;
data elements : the basic unit of data, A data element is composed of several data items;
data items : the smallest unit that makes up the data element;
examples of the relationship between data elements and data items : you can think of everyone ’s Weibo account as a data element, and it is composed of a nickname, gender Etc. data items;
data objects : haveData elements of the same natureIs a subset of the
data ; data structure : one or more types exist between each otherData elements for specific relationshipsCollection;
data type : a collection of values ​​and a set of operations defined on this collection (collection + operation); divided into the following three types:

1. Atomic type: a data type whose value cannot be subdivided;
for example:
bool type
Value range: true, false
Operation: AND, OR, NOT ...
2. Structure type: a data type whose value can be further decomposed into several components ;
3. abstract data type (ADT): defined by the digitized arithmetic logical structure data of the data; regardless of the specific implementation of the data structure; defines a the ADT, is the definition of the logical structure and operation data of the data, i.e.definitionA data structure;

Three elements

Insert picture description hereCollections : There is no other relationship between the data elements in the structure except "belonging to the same collection";
linear structure : the data elements in the structure existOne to oneRelationship; (except for the first data element has a precursor, except for the last data element has a successor)
tree structure : exists between the data elements of structureOne to manyRelationship;
graph structure or mesh structure : the data elements in the structure exist betweenMany to manyRelationship;
sequential storage : logically adjacent data elements are stored in physical locations that are also adjacent to each other;
chained storage : the use of pointers indicating the storage addresses of elements to represent the logical relationship between elements;
index storage : establishment Index table (keywords, addresses);

Index table: record the sequence of elements and the corresponding actual position of each element;
different data elements, different keywords

Hash storage : directly calculate the storage address of the element based on the element's keyword, also known as hash storage;

Published an original article · Like1 · Visits14

Guess you like

Origin blog.csdn.net/SY3548/article/details/105586878