Several conceptual data structure

First, the basic concept

data

Value Description objective things, a set of characters and various symbols can be input into the computer and can be processed , i.e., data of objective things can be identified using a computer, stored and processed for the description of

Data Elements

Composition data basic unit
Data entry is an integral dataThe smallest unit

Data Objects

The same natureA set of data elements

type of data

  • The same properties as a set of values, and the general term for a set of operations defined in this set of values
  • Data types define two sets, i.e., the type of the value range and the type may allow the use of a set of operation
  • Objective: To achieve information hiding, users do not have the details of the package
  • Classification ( "value"):
category Can break down
Structure type (non-component structure can also be a structure, such as arrays, structures By a number of ingredients in a certain structure. Decomposable
Unstructured atom type (standard C language type (integer, real, string, etc.) and a pointer Value Indecomposable

Abstract data types and data abstraction

Abstract data type (ADT) reprint blog

Three implementation

  1. The traditional process-oriented program design
  2. "Package" "model" design method
  3. Object-oriented programming

Second, the data structure

Content data structure can be grouped into three parts:

  1. Logical structure;
  2. Storage structure;
  3. Set operation;

Any algorithm design depends on the selected data ( logical ) configuration, and the algorithm implemented depends on the use of storage configuration

data structure

Defined
the presence of one or more specific one anotherrelationshipThe collection of data elements;

[Note]
    data structure is aTuple: Data_Structure = (D, R)
    wherein, D means a finite set of data elements, R is the relationship between the finite set of D

Logical structures (abstract data structures)

Between data elementsrelationshipdescription of

Four basic structure

basic structure relationship
Collection structure Belong to a collection
Linear structure One linear relationship
Tree structure Level-many relationship
FIG structure Any many relationship

Storage structure (data structure implemented)

Data elements with a number of computer == binary "bit string" indicates ==

The relationship between the data elements in the computer representation

  1. Sequentially stores:
    by means of the elements represent logical relationships between data elements in the relative position memory
  2. Chain stores:
    by means of the pointer indicates the logical relationships between data elements

Classification data structure

The data elements between the relationship

  1. Linear structure(Linear table, stack, queue, strings, arrays, generalized table)
  2. Nonlinear structure(Tree diagram)
Published 26 original articles · won praise 6 · views 1455

Guess you like

Origin blog.csdn.net/qiao_xi/article/details/100971202