Pregunta de entrevista de Pulse Secure

Write a most optimized program to reverse a singly linked list.