Array vs Linklist

List out the differences between an array and a linklist data structure.

Questions by Aqan12   answers by Aqan12

Showing Answers 1 - 6 of 6 Answers

rumesh.cse

  • Jun 10th, 2010
 

In liknked list insertion and deletion can be done anywhere in the structure, since the previous and next elements in the structures are linked to each other.

Whereas in arrays, there is no link between the elements in the structure, therefore insertion and deletion cannot be performed anywhere in the structure. It can only be performed at the end of the structure.


  Was this answer useful?  Yes

KS111

  • Jun 21st, 2010
 

1. The allocation of array elements in memory is contiguous. Each element in a Linked list can be placed anywhere in the memory.

2. Once defined, array size cannot be modified. In a linked list size can be modified dynamically.

3. Array is random access structure. Meaning, we can directly access the nth element by its index value. Linked list is sequential access data structure. In order to access nth element, we need to traverse all the nodes from starting till nth element.

- KS
(Please correct me if I made any mistakes. I would be more than happy to receive feedback)

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions