Advantages of Linked List in C Programming
Linked List :
In the last chapter we have learn the Consider following example of linked list -
Advantages of Linked List :
- Linked List is Dynamic data Structure .
- Linked List can grow and shrink during run time.
- Insertion and Deletion Operations are Easier
- Efficient Memory Utilization ,i.e no need to pre-allocate memory
- Faster Access time,can be expanded in constant time without memory overhead
- Linear Data Structures such as Stack,Queue can be easily implemeted using Linked list
1. Linked List is Dynamic in Nature -
- Linked List Data Structure is Dynamic in nature.
- We can have to just create Linked List structure and memory will be allocated at run time i.e while running program.
- At run time we can allocate as much memory as we can.
- Still there is limit for allocation of memory . [We can allocate memory considering that heap size will not be exceeded ]
2. Insertion and Deletion Operations are easy -
- Insertion and Deletion operations in Linked List is very flexible.
- We can insert any node at any place easily and similarly we can remove it easily.
- We don’t have to shift nodes like array insertion . In Insertion operation in linked list , we have to just update next link of node.
3. Memory Utilization -
- As explained earlier we don’t have to allocate memory at compile time.
- Memory is allocated at run time as per requirement , so that Linked list data structure provides us strong command on memory utilization.