Qualcomm interview question

Program to reverse singly linked list