Pergunta de entrevista da empresa Gentex Corporation

Write a function to reverse a singly linked list.