Google Interview Question

Write a function for reversing a linked list