I came across this problem in which you should swap a group of nodes in a doubly linked list. For example: for the list 1 <-> 2 <-> 3 <-> 4 <->
1 <-> 2 <-> 3 <-> 4 <->