HOW IS AN ARRAY DIFFERENT FROM LINKED LIST?

How is an Array different from Linked List?

The size of the arrays is fixed, linked lists are dynamic in size.

Inserting and deleting a new element in an array of elements is expensive, whereas both insertion and deletion can easily be done in Linked Lists.

Random access is not allowed in linked list.

Extra memory space for a pointer is required with each element of the linked list.

Arrays have better cache locality that can make a pretty big difference in performance.

 
 
 
 
 
 
 
 
 
 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>