Amazon interview question

Reverse a linker list