advantages and disadvantages of sequential tables and linked list storage
1. Sequential table Storage
Principle: Sequential table storage is to put data elements into a contiguous memory storage space, access efficiency, fast. But you can't increase the length dynamically.
Advantages: Efficient access, direct storage via subscript
Cons: 1. Insertions and deletions are slow, 2. Length cannot be increased
For example: when inserting or deleting an element, the entire table needs to traverse the moving elements to rearrange the order
2. Linked List Storage
Principle: The chain table storage is the dynamic allocation space in the process of running the program, as long as the memory has space, there will be no storage overflow problem
Pros: Fast insertion and deletion, preserving the original physical order, such as inserting or deleting an element, just change the pointer to point
Cons: Lookup is slow because you need to have a circular link list access when looking
From their storage advantages and disadvantages, each has its own usage scenarios, such as: frequent lookups but very few insert and delete operations can be stored in the sequential table, if the frequent inserts and deletions of small queries can use the linked list storage