You are on page 1of 1

Advantages of linked list

1. Dynamic Data Structure


Linked list is a dynamic structure so it can grow and shrink at runtime by allocating and
deallocating memory. So, there's no need to provide initial size of the linked list.

2. Insertion and Deletion


Insertion and deletion of nodes are easier and flexible. We can easily insert and remove any node
at any place. In array we have to shift elements after insertion or deletion of an element. In linked
list we just have to notify the address present in next pointer of a node.

3. No Memory Wastage
The size of linked list can be increased and decreased at run time therefore there's no wastage of
memory. In array there is a lot of memory wastage, like if we declare an array of size 9 and store
only 4 elements in it then space of 5 elements are wasted. There is no such drawback in linked
list as memory is distributed only if needed.

4. Implementation
Linear data structures like stack and queues can be easily implemented using linked list. If we
are implementing a priority queue where we need quicker insertion in the middle, it is good to go
with linked list.

You might also like