Prudential interview question

Reverse a linked list which was easy.