What is the difference between the supplement of a linked list and the supplement of an array?
Draft: 13:05:57
Differences between four linked lists and Arrays
Once the initial size of the array is determined, it cannot be changed. It is suitable for the case where the data volume to be processed is known.
Unknown amount of data to be processed using arrays may result in a waste of space or insufficient capacity. Although dynamic arrays can be resized, frequent resizing may cause a large overhead for the system.
The linked list capacity is not limited. The length is the same as the number of elements, but additional space is required to store the address of the next element. The space usage is not as good as the array.
Search by index. The time complexity of array access elements is O (1), and the linked list is O (n)
The time complexity for inserting and deleting linked lists is O (1), and the array is O (n)
The search value is an element of value, and the speed is the same.