Deleting duplicates from a sorted linked list
Given a sorted linked list, We have to delete all the duplicates in that list. For example, If we get the following list 1 -> 1 -> 2 -> 3 -> 3 -> 3 -> 4 -> 4 -> 5 The output should be 1 -> 2 -> 3 -> 4 ->5 To solve this…