Here is algorithm for swapping two nodes in linked list..
//A complete swap algorithm which cares of
//several scenarios while swapping two nodes in
//a linked list which doesn’t have any special nodes
//scenarios considered while swapping
//1)two nodes which are far away
//2)two nodes which are far away, one is node is at
// beginning of the list
//3)two node which [...]