the Little Elephant enjoy recursive functionsthis time enjoy sort function let permutation integer 1 n inclusive ai denote ith element permutation the Little Elephants recursive function fx sort x permutation element work follow if x1 exit function Otherwise fx1 swapax1ax swap xth x1th element the little Elephants teacher believe function work correctly but thatbe F Little Elephant want performance function help find permutation number 1 n perform little Elephants function fn permutation sort ascending order