Answer»
- A dynamic array is a data structure that allocates all elements contiguously in memory, and keeps a count of the present number of elements. If the area reserved for the dynamic array is exceeded, it’s reallocated and traced, a costly OPERATION.
- Linked lists have MANY BENEFITS over dynamic arrays. Insertion or deletion of an element at a specific point of a list, is a constant-time operation, whereas insertion in a dynamic array at random locations would require moving half the elements on the average, and all the elements in the worst case.
- Whereas ONE can DELETE an element from an array in constant time by somehow marking its slot as vacant, this causes fragmentation that impedes the performance of iteration.
|