Basic concepts of data structures

Source: Internet
Author: User

Basic concepts of data structures

Data element: a basic unit that makes up data and has a certain significance. It is usually processed as a whole in a computer, also known as a record.


Data items: a data element can contain several data items. Data items are the smallest units that cannot be separated.


Data Object: a set of data elements with the same nature and a subset of data.


Structure: structure refers to the arrangement of components. It is not allowed that data elements are not independent, but have specific relationships. We refer to these specific relationships as structures.


Data structure: a set of data elements that have one or more specific relationships with each other.


Logical Structure: refers to the relationship between data elements in a data object.
There are four types:
1. Set structure: Except for a set of data, the data elements of the set structure have no relationship between them. Each data element is "equal" and their common attribute is "Same as a set ". The set relationship in the data structure is similar to the set in mathematics.
2. Linear Structure: one-to-one relationship between data elements in a linear structure.
3. Tree Structure: there is a one-to-many hierarchy between data elements in the tree structure.
4. Graphic Structure: The data elements of a graphic structure are many-to-many relationships.




Physical structure: (Storage Structure) Storage Format of the index data Logical Structure in the computer. Memory is mainly used for memory. The data organization of external memory such as hard disk, floppy disk, and CD is usually described in the file structure.
The direct logical relationship of data storage elements is the key and difficult point to achieve the physical structure.
There are two storage structures for data elements: sequential storage and chained storage.
1. Ordered Storage Structure: data elements are stored in address-contiguous storage units. The logical and physical relationships between data are consistent.
This storage structure is actually very simple, queuing placeholder.
2. chained Storage Structure: The White data elements are stored in any storage unit. These storage units can be continuous or discontinuous.


Data Type: refers to a set of values of the same nature and a general term for some operations defined on this set.


In C, data types can be divided into two types:
Atomic type: it is a basic type that cannot be further decomposed, including integer, real, and complex types.
Structure Type: It is composed of several types and can be further decomposed. For example, an integer array is composed of several integer data types.


Abstraction is the universal nature of transactions.


Abstract Data Type (ADT): Refers to a mathematical model and a group of operations defined on the model.
ABSTRACT Data Types reflect the problem decomposition, abstraction, and Information Hiding features in programming.


Standard Format of abstract data types:
ADT abstract data type name
Data
Definition of the logical relationship between data elements
Operation
Operation 1
Initial Condition
Operation Result description
Operation 2
.......
Operation n
........
EndADT














Question about basic concepts of Data Structure

A.
Except for the first and last two nodes, all the other nodes in the table have only one node adjacent to it before it, there is also only one node adjacent to it, which is the logical structure of the user information table. This is the logical representation of data in a computer and cannot be independent from a computer. A is incorrect.
When saving all the nodes in a table to a computer, you must consider the storage structure. When using the C language for design, the common method is to use a structure array to store the entire user information table, each array element is a structure that corresponds to a node in the user information table. Data is stored on a computer in a storage structure. It not only includes the internal representation of data, but also the contact information between data, whether it is sequential storage or chained storage. B.
In sequential storage, the logical structure sequence is the same as the storage structure sequence. It is stored in a continuous storage area in the memory area. C pair.
The definition of computing in the data structure is a broad concept. It not only provides processing functions, but also specifies the way to handle problems. D pair.

Basic concepts of Data Structure

In a directed graph, edges are usually called arcs. One end with arrows is called an arc header, and the other end is called an arc tail, which is recorded as <vi, vj>, it indicates that an edge exists from vertex vi to vertex vj.

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.