Swapping the value

i am having difficulty in swapping the value

Hey @kodivine0
image image

https://ide.codingblocks.com/s/325590 my o/p is incorrect, can u explain?

Hey @kodivine0
Did one change and mentioned in comments

We did so because elements are swapped.