Tricky permutations


showing tle in 2 cases

Hey @divyam_13
Its not even compiling on my side,please send the correct code :slight_smile:

Your code is logically correct after removing compilation errors but it is giving TLE in last 2 testcases
this is because of set

NOTE: DO NOT USE MAP OR SET.
So, please think of an approach that do not uses set or map.

Refer to this if required :slight_smile:

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.