Paytm interview question

reverse a link list