Bloomberg interview question

how to reverse a linked list