Qualcomm Interview Question

There was a question on swapping two nodes in doubly linked list.