Infosys interview question

reverse linked list!