Amazon interview question

reverse a linked list. from last