Q Agency interview question

Write a function to reverse a linked list.