Oracle interview question

program to reverse linked list