Tricky Permuatations


runtime error in 1 -3 test cases

@yyashu123
You’re assuming that total strings generated will be around 100
But for string length 8 total possible permutations are 8! which is much higher than 100
Please fix this
If your doubt is resolved please close it.

i have made the changes yet i am getting TLE in 0 -2 test cases

@yyashu123
One more error
You’re checking duplicates before inserting each time
Your complexity is N^2 where N is 8!
insert all elements in a set instead