Advantage and disadvantages of singly linked list
Answers
Explanation:
SINGLY LINKED LIST
*ADVANTAGE :-
1) Insertions and Deletions can be done easily.
2) It does not need movement of elements for insertion and deletion.
3) It space is not wasted as we can get space according to our requirements.
4) Its size is not fixed.
5) It can be extended or reduced according to requirements.
6) Elements may or may not be stored in consecutive memory available,even then we can store the data in computer.
7) It is less expensive.
*DISADVANTAGE :-
1) It requires more space as pointers are also stored with information.
2) Different amount of time is required to access each element.
3) If we have to go to a particular element then we have to go through all those elements that come before that element.
4) we can not traverse it from last & only from the beginning.
5) It is not easy to sort the elements stored in the linear linked list.
The advantages and disadvantages of a singly linked list are as follows:
- Memory allocation: One of the biggest advantages of a singly linked list is dynamic memory allocation. Memory is allocated only when it is required.
- Time: Singly linked list requires less access time which is also a great advantage of a singly linked list.
- Traversing: The singly list can only move forward so it is very difficult to traverse in a reverse way. This is a big disadvantage of singly link list.
- Space: Since we have to use pointers and store data, much more space is used up in a linked list. This is also a disadvantage of the singly linked list.