Data structure (12)--basic concept of data structure

Source: Internet
Author: User
Tags abstract
Data Structure Basics

Basic concepts of data structure what is a data structure

Data structure is a basic concept and terminology of the computer operation object and the relation and operation between them in the program design of non-numerical computation: In Computer science, all the symbols that can be entered into the computer and processed by computer programs.
(for computer science, the meaning of data is very broad, such as images, sounds, etc. can be encoded in the context of the data) data elements: the basic unit of data, in the computer is usually considered and processed as a whole
(sometimes, a data element can consist of more than one data item, which is an indivisible, smallest unit of data) data object: A collection of data elements of the same nature: data elements with one or more specific relationships to each other
(There must be some relationship between the data, the relationship between the data elements is called the structure) 4 kinds of data between the basic structure of the collection: elements of the structure in addition to the "belong to a set" relationship, there is no other relationship linear structure: data elements in the structure have one by one corresponding relations Tree structure: The element data in the structure has a one-to-many relational network structure: There are many-to-many relationships between the element data in the structure

The relationships defined in the structure describe the logical relationships between the data elements, and therefore, the relationship between the logical structure data elements in the computer has two different forms of representation (sequential image):
Use the relative position of elements in memory to represent the chain of logical relationships between data elements (non-sequential images):
Represents a logical relational data type between data elements with a pointer indicating the storage address of the element

A data type that explicitly or implicitly specifies all possible ranges of values for variables or expressions during program execution, and the operations allowed on those values. Therefore, the data type is a collection of values and defines a set of operations on this set of values abstract data type (ADT)

Refers to a mathematical model and a set of operations defined on the model
The following ternary groups are available:
(d,s,p)
D: Data Objects
S: Relationship Set
P: Basic operation set representation of abstract data types and implementation of predefined constants and types

Function structure Status Code
#define TURE 1
#define FALSE 0
#definr OK 1
#define ERROR 0
#define INFEASIBLE-1
# Define OVERFLOW-2
//status is a function type whose value is the function result status code
typedef int Statys;
Representation of a data structure (storage structure) with a type definition (typedef) Description
The Data Element type convention is elemtype, and the algorithm used by the user to define the basic operation is encapsulated with a function
Statue function name (parameter table)
{
function body
}//functional Name
algorithm

An algorithm is a description of a specific problem solving step, which is a limited set of instructions, where each instruction represents one or more of the five characteristics of the operation algorithm has poor certainty feasibility of input and output + evaluation algorithm Four aspects of correctness readability robustness efficiency and low Storage requirements

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.