how we can solve this I concluded we need predecessor and successor node of the nodes which are going 2 be interchanged
You will need 2 pointer which iterate over the whole list …Since in selection sort you use 2 loops and 2 counters the same thing here will be done by using 2 loops and 2 pointers …You must try to implement this by starting with bubble sort on the linked list then try using selection sort .