Data structure - linear structure (2)

data structure


foreword

I mentioned the data structure a long time ago. The previous blog briefly introduced what a linear structure is. This blog simply makes a supplement.
Common data structures can be divided into: linear structure, tree structure and graph structure.
A linear structure is a collection of ordered data elements.
Commonly used linear structures are: arrays, linked lists, stacks, queues, etc.

1. Linear structure

1. Linear table

A linear table is one that can be connected into a line and lined up.

2. The characteristics of the linear table

1. Direct predecessor
2. Direct successor
For example, from 1 to 10, the predecessor of 2 is 1, and the successor is 3, which probably means this

2. Storage form of linear structure

1. Sequential structure

Sequential storage, which can be understood as an array

2. Chain structure

Linked storage, which can be understood as a linked list

Guess you like

Origin blog.csdn.net/qq_51963216/article/details/128785126