Thursday, June 27, 2013

What are the advantages and disadvantages of array implementation of list?



Advantages:
·         Easy to implement
·         Random access is easier
·         suitable when the number of elements are predefined or already known.
Disadvantages:
·         Inserting and deleting elements at and from random position requires shifting of preceding and succeeding elements.
·         Size of array is fixed so the elements beyond the size cannot be added.
·         Larger array may lead to high memory wastage, if we add only few elements in it.

1 comment: