Introduction to basic concepts and terms of data structures and algorithms, and introduction to data structures and algorithms

Source: Internet
Author: User

Introduction to basic concepts and terms of data structures and algorithms, and introduction to data structures and algorithms

In order to get a "common language" with everyone, some concepts and terms are given definite meanings.


1. data: a symbolic representation of objective things. In computational science, it refers to all symbols that can be input into a computer and processed by a computer program.

2. data element: it is the basic unit of data. It is usually considered and processed as a whole in computer programs. A data element can be composed of several data items, which are the smallest units that cannot be separated.

3. data object: A combination of data elements of the same nature. It is a subset of data.

In summary, the relationships between data, data objects, data elements, and data items can be summarized as follows:Data items are the smallest units that cannot be separated. Several data items can form a data element. Data elements with the same nature are data objects, and data objects are a subset of data.


4. data structure: a collection of data elements with one or more specific relationships between them. The relationship between these data elements is called structure ). Based on different features of data elements, there are usually four basic structures:

(1) set: there is no other relationship between data elements in the structure except the "same set;

(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 data elements in the structure;

(4) graph structure or mesh structure: There is a many-to-many relationship between data elements in the structure;


The purpose of discussing the data structure is to operate on it in a computer, so we need to study how to represent it in a computer.

5. The representation or image of the data structure in the computer becomes the physical structure of the data, also knownStorage Structure. It includes the representation of data elements and the representation of relations.

In a computer, the smallest unit of information is a binary bit ). We can use a single bit string composed of several bits to represent a data element. This bit string is called an element or node ). When a data element is composed of several data items, the substring corresponding to each data item in the bit string is called the data field ). Therefore, an element or node can be considered as a ing of data elements in a computer.


6. The relationship between data elements has two different Representation Methods in the computer:Sequential ingAndUnordered ingAnd two different storage structures are obtained:Sequential Storage StructureAndChained Storage Structure.

Sequence ing features: the logical relationship between data elements is expressed by the corresponding positions of elements in the memory.

The characteristics of unordered ing: the pointer indicating the storage address of an element represents the logical relationship between data elements.

In short, the logical and physical structures of data are closely related to the following two aspects:The design of any algorithm depends on the selected data (logical) structure, and the implementation of the algorithm depends on the storage structure used.


7. data type: a set of values and a group of operations defined in this set of values.

Abstract data type (ADT): A mathematical model and a group of operations defined on the model.


8. algorithm (algorithm): describes the specific steps for solving a specific problem. It is a finite sequence of commands. Each instruction represents one or more operations.

An algorithm also has the following five important features:

(1) Poor: An algorithm must always end after a poor step is executed, and each step can be completed within a short time;

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

(3) Feasibility: the operations described in the algorithm can be implemented only a limited number of times through the implemented basic operations;

(4) input: An algorithm has zero or multiple inputs, which are taken from the set of a specific object;

(5) Output: An algorithm has one or more outputs, which are the same as the number of inputs with certain specific relationships.

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

Measure of algorithm efficiency: time complexity and space complexity.


Related Article

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.