Wipro interview question

reverse a linked list and a question based on sorting