Pregunta de entrevista de Oracle

They asked to write algorithm for reversing a linked list .