Statement: In the author's study of data structure published in the process of post, is generally their own learning after the summary of knowledge points, while some are excerpts from the textbook, Learning materials for the "Data structure C language version" Qin Feng editor. It is hereby stated that subsequent posts are not duplicated.
First, the basic concept
(data) is a symbolic representation of an objective thing, which can be identified, stored, and processed by the computer.
The data element is the basic unit of data and is sometimes an element, node, vertex, or record.
A data item is the smallest identifying unit, also called a field, domain, or property.
Data structure refers to the interrelationship between the elements of a database, that is, the organization of data.
The data structure generally includes the following three aspects:
(1) The logical relationship between data elements, also known as the logical structure of data, is a property of the data itself.
(2) The representation of the data elements and their logical relationships in the computer, that is, the storage structure of the data. It must depend on the computer.
(3) Data operations, operations on data elements. The definition of an operation depends on the logical structure, and the implementation of the operation depends on the storage structure.
Common logical relationships for data elements:
Collection : There is no logical relationship between any of the two data elements in a struct, and they are all independent.
linear structure : There is a one-to-one relationship between data elements in the structure.
tree Structure : There is a one-to-many relationship between the data elements in the structure.
Graph Structure : There are many-to-many relationships between the data elements in the structure.
Common storage structure for data:
Sequential storage : Data elements are stored sequentially in a contiguous set of address spaces.
Chained storage : Data elements are stored in a random address space, and a pointer field is set in each data element to identify a one-to-two relationship between data elements, which becomes a chained storage structure.
Lasso Storage : While storing data elements, attach a citation table, its common format < keywords, address, where the keyword is a data item that uniquely identifies the data element. If there is a single lead item in each data element, it is called a dense cable. If an anchor item corresponds to a set of data elements, it is called a sparse lead cable.
Hash Storage : Hash is the method by which a hash function calculates an address space based on the keywords in the data element and stores the data elements in that address space. a hash function is a pre-designed function that computes an address space through a keyword, which becomes a hash address.
data type : A collection of values and a generic term for a set of operations defined on that collection.
Data types can be divided into atomic types and struct types.
The value of the atomic type is no longer decomposed.
A struct type consists of an atomic type or struct type.
abstract data type : Refers to a mathematical model and a set of operations defined on the model. It is generally possible to define elements, relationships, and operations by three elements. (Example: An integer type is an abstract data type, although operations such as subtraction are implemented differently on different processors, but because the mathematical characteristics of their definitions are the same, they are all the same in the user's opinion.) Therefore, the meaning of "abstraction" lies in the mathematical abstraction of the data type. )
algorithm : Refers to the description of a method step that solves a particular problem.
5 Characteristics of the algorithm: poor, deterministic, feasibility, input, output.
Algorithm evaluation criteria: correctness, readability, robustness, space-time efficiency.
time complexity : Refers to the time that the algorithm consumes from the start of the run to the end of the run, generally using the sum of the frequencies required for all the statements in the algorithm.
spatial Complexity : the auxiliary work units that the algorithm needs to operate on the input data and the secondary space that is stored for the information needed to achieve the calculation.
If there are errors, please contact the author timely correction, thank you very much!
This article is from the "Learning Boundless" blog, please be sure to keep this source http://xhwykzz.blog.51cto.com/10728431/1696928
Related basic knowledge