Skip to content

Commit

Permalink
Update Pair_wise_swap.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
STREIN-11 authored Dec 13, 2024
1 parent 7766c62 commit 76de029
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Daily/Pair_wise_swap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76de029

Please sign in to comment.