class Solution
{
public:
Node* pairWiseSwap(struct Node* curr)
{
// The task is to complete this method
if(!curr || !curr->next)
return curr;
Node* nxtHead = pairWiseSwap(curr->next->next);
Node* newHead = curr->next;
curr->next->next = curr;
curr->next = nxtHead;
return newHead;
}
};