Basic knowledge of data structures

Source: Internet
Author: User

 Simply put, the data structure is a subject that studies the computer's Operation object and the relation and operation between them in the programming problem of non-numerical computation.    Mathematical models that describe a class of non-numerical computational problems are no longer mathematical equations, but data structures such as tables, trees, and graphs. The research of "data structure" not only involves the research scope of computer hardware (especially coding theory, storage device and access method), but also has a closer relationship with the research of computer software, whether it is a compiler or an operating system, it involves the allocation of data elements in memory. When researching information retrieval, it is also important to consider how to organize the data so that it is easier to find and access data elements.    Therefore, it can be considered that "data structure" is a core course between mathematics, computer hardware and computer software. In computer science, "data structure" is not only the basis of general program design (especially the programming of non-numerical computers), but also is an important foundation for designing and implementing compiler, operating system, database system and other system programs and large-scale applications.
Basic concepts and terminology Datais a symbolic representation of an objective thing, which in computer science refers to all the symbols that can be entered into a computer and processed by a computer program. Data Elementsis the basic unit of data, which is usually considered and processed as a whole in a computer. Sometimes, a data element can consist of several data items, for example, the number of a book is a data element, and each item in the bibliographic information (such as the title, author name, etc.) is a data item. A data item is an indivisible minimum unit of data. Data Objectsis a collection of data elements of the same nature, and is a subset of the data.Data Structureis a collection of data elements that have one or more specific relationships between each other. In any problem, the data elements are not isolated, but there is a relationship between them, the relationship between the data elements is called structure。 Depending on the nature of the relationship between the data elements, there are generally 4 basic structures: Collections: There is no other relationship between data elements in a struct, except for the relationship belonging to one set; Linear structure: There is a relationship between the data elements in the structure ; Tree structure: There is a multiple relationship between the data elements in the structure, the graph structure or the mesh structure: there are multiple relationships between the data elements in the structure.
The form of the data structure is defined as: The data structure is a two-tuple data_structure (d,s) Where: D is a finite set of data elements, and S is a finite set of relationships on D.
A "relationship" in a structure definition describes a logical relationship between data elements and is therefore referred to as the logical structure of the data. The representation of a data structure in a computer (also known as an image) is called the physical structure of the database, also known as the storage structure. It contains representations of data elements and representations of relationships.
The relationship between data elements has two different representations in the computer: sequential images and non-sequential images, and thus different storage structures: sequential storage structures and chained storage structures.
The data type is a collection of values and a generic term that defines a set of operations on that set of values.
According to the different characteristics of "value", the data types in the high-level programming language can be divided into two categories: one is the non-structural atomic type and the other is the structure type.
Abstract data type (ADT) refers to a mathematical model and a set of operations that are defined on the model. Abstract data types can be divided into the following 3 types of atomic types, depending on their values: The value of a variable of an atomic type is non-biodegradable. Fixed aggregation type: A variable of this type whose value consists of a certain number of components in a structure. such as: the plural is a sequence of two real numbers in order to determine the relationship of the composition. Variable aggregation type: The number of components that make up the variable aggregation type "value" is indeterminate compared to the fixed aggregation type. , multi-shape data type: Refers to the data type whose value is not determined by the component.

algorithmis a description of the solution step for a particular problem, which is a finite sequence of instructions, where each instruction represents one or more operations, and an algorithm has the following 5 important features.have poor sex: An algorithm must always (for any legal input value) end after execution has a poor step, and each step can be completed in a poor time.Deterministic: Each instruction in the algorithm must have an exact meaning, and the reader will not have two semantics when it is understood. And, under any conditions, the algorithm has only one execution path, that is, the same output can only be obtained for the same input.Feasibility: An algorithm can be done, that is, the operations described in the algorithm can be implemented by the implementation of the basic operation of a finite number of times to achieve.input: An algorithm has 0 or more inputs that are taken from a collection of specific objects.Output: An algorithm has one or more outputs that have a certain amount of specific relationship with the input.

Algorithm design requirements: Correctness--------readability---------robustness-----------efficiency and low storage requirements.
Time complexity is the number of executions and loops




Fundamentals of data Structures

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.