Infosys interview question

Reverse a linklist, rotate a array