Delete duplicate adjacent nodes in linked list
Write an efficient to delete adjacent duplicate nodes in linked list.
1) If linked list are empty show valid user message.
2) If similar group of adjacent node are found. Then hold first node of this group and delete other similar nodes of this pair.
For example suppose given linked list contain following nodes [1 7 7 7 2 2 9 7].
View pointers and nodes of this linked list.
In this linked list two group of same adjacent nodes [7 7 7 ,2 2]. view in below.
- Single linked list delete node in given position
- Single linked list delete middle element
- Move first node a middle of given linked list
- Move middle node at beginning of given linked list
- Delete even key node of given linked list
- Delete all odd key nodes from given linked list
- Get element at specific index of linked list