Arrange a linked list with some integer value, in such order so that adjacent nodes are swapped
Anonymous
There are two things: Either only swap values or swap pointers but swapping next pointers is more reliable as there can be more than one value element.
Check out your Company Bowl for anonymous work chats.