Oracle Interview Question

They asked to write algorithm for reversing a linked list .