i have doubt about a linked list variant problem. could someone explain what is the sample output for this problem ?
let M be positive integer and L a sorted single linked list of integers for each k, if k is appear more than M times in L, remove all nodes from L containing k.
Remove values appearing more than m times in a sorted singly linked list
as per my understanding the below should be the input and out put
input : L = 1->2->2->2->2->3-> NULL
Output L = 1->3->NULL
here program should remove all 2 .
Please reply when you have time