State the difference between arrays and linked lists
3 years ago
Data Structure and Algorithm
Arrays |
Linked Lists |
Size of an array is fixed |
Size of a list is variable |
It is necessary to specify the number of elements during declaration. |
It is not necessary to specify the number of elements during declaration |
Insertions and deletions are somewhat difficult |
Insertions and deletions are carried out easily |
It occupies less memory than a linked list for the same number of elements |
It occupies more memory |
Sanisha Maharjan
Jan 23, 2022