| |
Static vs. Dynamic Data Structures | page 5 of 7 |
An array is a somewhat static data structure that has these advantages and disadvantages:
Advantages of array class | Disadvantages of array class |
- Easy to implement and use.
- Fast, random access feature.
|
- Memory is usually wasted.
|
A linked list, (LL), is a dynamic data structure which has these advantages and disadvantages.
Advantages of LL | Disadvantages of LL |
- Memory is allocated when the program is run, therefore the data structure is only as big as it needs to be.
- Memory is conserved.
|
- Each node of the list takes more memory.
- Processing is slower.
- The data structure is not random access.
- Processing must be done in sequential order.
|
|