# # Advantages and disadvantages Comparison
# Advantages of Linked list
-Easy to create and add, randomly stored in free memory without the need for contiguous memory space
-efficiency is the same as array when all elements need to be read
-the list is more efficient when you insert or delete elements in the middle without considering the time of the search
# Disadvantages of a linked list
-Inconvenient to read, must start reading from the first element in order to obtain the memory address of the subsequent element
-Low efficiency when jumping or reading a later element
-linked lists must have sequential access to elements
# Advantages of arrays
-can read any one element quickly
-the array can then access the element
# Disadvantages of arrays
-Must be stored in contiguous memory space, when adding elements without contiguous free memory space, the entire array must be migrated
-the array is inefficient when you insert or delete elements in the middle without considering the lookup time
Advantages and disadvantages of arrays and linked lists