Given a singly linked list, swap every two elements (e.g. a->b->c->d->e->f->null should become b->a->d->c->f->e->null). Code it such that memory position is swapped and not the node value.
Here is the program for the generic version of the above problem
http://crackinterviewtoday.wordpress.com/2010/03/28/k-reverse-linked-list/
No comments:
Post a Comment