Swapping alternate nodes of linkedlist