PayU interview question

factorial , reverse a string