Labels: Advantages and Disadvantages of linear table sequential Storage Structure
Advantages: 1. You do not need to add additional storage space to represent the logical relationship between elements in the table.
2. You can quickly access any element in a table.
Disadvantages: 1. Insert and delete operations require moving a large number of elements.
2. When the length of a linear table changes greatly, it is difficult to determine the storage space capacity.
3. Fragments of storage space ".
==========================================================
However, you need to note that you can quickly access the "Storage" at any location in the table. What is the difference with "insert?
The meaning of "save" is to assign a value to any position of the linear table, expressed as the program code is arr [3] = 100;
"Insert" means to insert an element at position I. For example, insert the third position of a linear table, that is, each element after the third element must move one digit backward (the length of the array is assumed to be long enough ).
For (INT I = 3; I <10; I ++ ){
Arr [I + I] = arr [I];
}
This shows that the linear sequence storage structure is suitable for applications where the number of elements does not change much, but more data is accessed.
Advantages and disadvantages of sequential storage structure of linear tables