Mr. Cooper Interview Question

write the reverse of string function using factorial?