Given a singly linked list, write a function to swap elements pairwise.
Input : 1->2->3->4->5->6->NULL
Output : 2->1->4->3->6->5->NULL
Start from the head node and traverse the list. While traversing swap data of each node with its next node’s data.
Pairwise swap elements of a given linked list : https://www.geeksforgeeks.org/pairwise-swap-elements-of-a-given-linked-list/