Mr. Cooper interview question

write the reverse of string function using factorial?