Introduction to basic concepts and terminology of data structure and algorithm introduction

Source: Internet
Author: User

In order to obtain "common language" with you, the following concepts and terminology are given a definite meaning.


1, data: the symbol of the objective thing, in the computational science, all the symbols can be entered into the computer and processed by computer programs collectively.

2. Data element: is the basic unit of data, which is usually considered and processed as a whole in computer programs. A data element can consist of several data items (data item), which is the smallest unit of data that is indivisible.

3. Data object: A combination of data elements of the same nature, which is a subset of the data.

In summary, the relationship between data, data objects, data elements, and data items can be summarized as: The data item is the smallest unit of data indivisible, several data items can form a data element, the same data element is a data object, and the data object is a subset of the data.


4. Data structure: A collection of data elements that have one or more specific relationships with each other. The relationship of this data element to each other is called structure (structure). Depending on the characteristics of the data elements, the following 4 basic structures are usually available:

(1), set: In the structure of the data elements in addition to the "belong to a set" relationship, there is no other relationship;

(2), linear structure: there is a one-to-one relationship between data elements in the structure;

(3), tree structure: There is a one-to-many relationship between the data elements in the structure;

(4), graphic structure or network structure: There are many-to-many relationships between data elements in the structure;


The purpose of the discussion data structure is to implement it in the computer, so you need to look at how it is represented in the computer.

5, the data structure in the computer's representation or image becomes the physical structure, also known as the storage structure . It includes representations of data elements and representations of relationships.

The smallest unit of information represented in a computer is a binary (bit). We can use a bit string formed by a number of bits to represent a data element, called the string Element or node (node). When a data element consists of several data items, the sub-string corresponding to each data item in the bit string is called the data field. Thus, an element or node can be thought of as a mapping of data elements in a computer.


6, the relationship between the data elements in the computer has two different representations: sequential mapping and non-sequential mapping , and thus get two different storage structure: sequential storage structure and chain storage structure.

The characteristic of sequential mapping is that the logical relationship between data elements is represented by an element in the corresponding location in memory.

Characteristics of non-sequential mapping: The logical relationship between data elements is represented by a pointer (pointer) indicating that the element stores the address.

In summary, the logical and physical structure of data is closely related to two aspects: the design of any one algorithm depends on the selected data (logical) structure, and the implementation of the algorithm relies on the storage structure adopted.


7. Data type: A collection of values and a generic term for a set of operations defined on this set of values.

Abstract data Type,adt: Refers to a mathematical model and a set of operations defined on the model.


8, Algorithm (algorithm): is a description of the specific problem solving steps, it is a finite sequence of instructions, each of which represents one or more operations.

An algorithm also has the following 5 important features:

(1), poor: An algorithm must always be executed after the poor step, and each step can be completed in a poor time;

(2), certainty: Each instruction in the algorithm must have the exact meaning, and under any conditions, the algorithm has only one execution path, that is, for the same input can only get the same output;

(3), feasibility: The operation described in the algorithm can be implemented by the basic operation of the implementation of a finite number of times;

(4), input: An algorithm has 0 or more inputs, which are taken from a collection of a particular object;

(5), output: An algorithm has one or more outputs, which are the amount of certain relationships entered with the input.

Algorithm design requirements: Correctness, readability, robustness, efficiency and low storage requirements;

The measurement of algorithm efficiency: time complexity and space complexity.


Introduction to basic concepts and terminology of data structure and algorithm introduction

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.