I read the book on data structure today, and I want to share with you the linear structure and nonlinear structure I understand.
What is a linear structure? What are the characteristics?
Linear structures have a unique first element (the first element)
Linear structures have a unique tail element (the last element)
Except for the first element, all elements have a unique "
predecessor
"
All elements except the tail element have a unique "
successor
"
There is a "one-to -one
" relationship between data elements
For example: array A1,A2,A3,........An, the first element is A1, and the last element is An
What is a linear structure?
Sequential list (one-dimensional array), heap, stack, queue, linked list
What is the nonlinear structure?
There is a one-to-many or many-to-one relationship between data elements
What is a nonlinear structure?
Graph (group structure), tree (hierarchy), multidimensional array
Original link: click to open the link