Swiggard Creative interview question

Implement a function to reverse a linked list