Pulse Secure Interview Question

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