Microsoft interview question

Implement a function to reverse a linked list.