From 76de0291d81c9dcc279bafdfb9f93257bf6d5f57 Mon Sep 17 00:00:00 2001 From: SUBHAMAY__GANGULY <71601569+STREIN-11@users.noreply.github.com> Date: Fri, 13 Dec 2024 23:05:39 +0530 Subject: [PATCH] Update Pair_wise_swap.cpp --- Daily/Pair_wise_swap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Daily/Pair_wise_swap.cpp b/Daily/Pair_wise_swap.cpp index 88fc024e..f181c70d 100644 --- a/Daily/Pair_wise_swap.cpp +++ b/Daily/Pair_wise_swap.cpp @@ -3,6 +3,9 @@ Given a singly linked list of size N. The task is to swap elements in the linked For example, if the input list is 1 2 3 4, the resulting list after swaps will be 2 1 4 3. Note: You need to swap the nodes, not only the data. If only data is swapped then driver will print -1. + + + Example 1: Input: LinkedList: 1->2->2->4->5->6->7->8