Qn:  Write a function to swap the adjacent nodes of a singly linked list.i.e. If the list has nodes as 1,2,3,4,5,6,7,8, after swapping, the list should be 2,1,4,3,6,5,8,7    Image from: https://tekmarathon.com    Though the question looks simple enough, it is tricky because you don't just swap the pointers. You need to take care of links as well.   So let us try to understand how to go about it.   Take two adjacent nodes p1 and p2  Let prevnode be previous node of p1  Now link prevnode to p2  Link p2 to p1  Link p1 to next node of p2   So the code will be    prevnode -> next  =  p2; p1 -> next =  p2 -> next; p2 -> next =  p1;    But what about the start node or head?   head node does not have previous node  If we swap head with second node, modified head should be sent back to caller    To take care of swapping first and second nodes, we can write     p1 =  head; p2 =  head -> next; p1 -> next =  p2 -> next; p2 -> next =  p1; head =  p2;     Now we are...