Amazon Interview Question

Reverse the given linked list