Brief introduction of the advantages and disadvantages of sequential storage structure and chained storage structure
① sequential storage, the storage address of adjacent data elements is also adjacent (logical and physical unification); requires that the address of the memory available storage unit must be contiguous.
Advantages: Large storage density (=1), high storage space utilization. Cons: inconvenient when inserting or deleting elements.
② chain storage, the adjacent data elements can be stored at will, but the storage space is divided into two parts, part of the node value, and the other part of the node to represent the relationship between the pointer
Pros: Easy to insert or delete elements, flexible to use. Disadvantage: Small storage density (<1), low storage space utilization.
Data structure and algorithm--5th Zhou (linear table merging algorithm)