Tech Mahindra interview question

Write a program to Reverse a liked list.