Amazon interview question

3 sum, Reverse a linked list