Hey on finding the no of permutations for >8 I am getting TLE

Here n<=10…so how should I proceed in this…moreover tell me that here I have an array in which for the recursion I have to remove one element from array and pass the remaining for the recursion…how should I do that…do I have to use LinkedList for that…or everytime make a new array…with one less lenght…


refer this for logic

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.