Monday, October 14, 2013

[Amazon] Pair wise swap in Linked List

Given a singly linked list, write a function to swap elements pairwise.

Ex-  If linked list is 1->2->3->4->5
       Result will be 2->1->4->3->5

1 comment:

  1. http://www.geeksforgeeks.org/pairwise-swap-elements-of-a-given-linked-list/

    ReplyDelete