redBus India interview question

How to reverse a linked list