Wednesday, October 8, 2008

Favorite Interview Question (Part 2)

From Part 1 we know what some properties a good interview questin should have.  So here is my question of choice:

Given a singly linked list, interleave the list. Interleaving a link list involves alteratinly taking the first and then last item to form the new list. So a list with elements: 1 2 3 4 5 when interleaved looks likes 1 5 2 4 3. Go.


So thats it. How would you solve it? In part 3 I'll discuse what makes a good answer.

0 comments: