Basic Concepts of Data Structures
(1) What is a data structure A
data structure is the way a computer stores and organizes data. A data structure is a collection of data elements that have one or more specific relationships to each other. Often, a well-chosen data structure can lead to higher operational or storage efficiency. Data structures are often associated with efficient retrieval algorithms and indexing techniques.
(2) Why do you need to understand the data structure? The performance bottleneck of the
program is often related to the algorithm and the data structure. In short, it can make your program run faster
. (3) The logical structure of the data structure The
logical refers to the data in the data object. The relationship between elements is divided into the following four types:
(1)
Set The element relationship in the set structure is isolated
(2) The linear structure
The element relationship in the linear structure: one-to-one
(3) Tree structure
tree Element relationship in shape structure: one-to-many
(4) Graph structure
Element relationship in graph structure: many-to-many
(3) Physical structure of data structure
Physical structure: refers to the storage form of the logical structure of data in the computer. There are two storage structures:
(1) Sequential storage structure:
Sequential storage structure: data elements are stored in storage units with consecutive addresses, and the logical and physical relationships between the data are consistent.
(2) Chained storage structure
Chained storage structure: It stores data elements in any storage unit. This group of storage units can be continuous or discontinuous.
(4) Common data structures in programming languages
Array (Array)
Stack (Stack)
Queue (Queue)
Linked List (Linked List)
Tree (Tree)
Graph (Graph)
Heap (Heap) Hash Table
(Hash)
Summary:
This article introduces some concepts and knowledge related to data structure. Only by understanding the data structure can we help us Better to design algorithms and programs.
Refer to the article
https://my.oschina.net/zhangxiaoxin210/blog/1499559
If you have any questions, you can scan the code and follow the WeChat public account: I am the siege division (woshigcs), leave a message in the background for consultation. Technical debts cannot be owed, and health debts cannot be owed. On the road of seeking the Tao, walk with you.
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326261691&siteId=291194637
Recommended
Ranking