swap the element with adjacent element?
Created 2 years ago
631
Views
4
Comments
Given an array of N elements switch(swap) the element with the adjacent element and print the output.
Sample Testcase :
INPUT
5
3 2 1 2 3
OUTPUT
2 3 2 1 3