Storage Allocation Method:
1. Sequential storage structure stores data elements of linear tables at once with a contiguous storage unit
2. Single-linked list adopts chain storage structure, and the elements of linear table are stored with a set of arbitrary storage units.
Time Performance:
1. Find: Sequential storage structure O (1)
Single-linked list O (n)
2. Insert and delete: Sequential storage structure requires an average of half of the moving table elements, the time complexity is O (n)
The time complexity of inserting and deleting a single linked list is only O (1) After finding a pointer to a position
Space performance:
1, the sequential storage structure to pre-allocate storage space, divided into a large waste, sub-small easy to cause overflow
2, single-linked list does not need to implement allocation of storage space, as long as there is free space can be temporarily allocated, the number of elements is not limited
In short, the sequential storage structure of the linear table and the single-linked list structure each has its advantages and disadvantages, can not simply say which good, which is bad, need according to the actual situation, to balance the use of which data structure to meet and achieve demand and performance.