Help with PERMUT2 - WA

Am getting a WA for the below solution :

I know there is some redundant code there, but still not able to understand where the WA could be coming from.
Any help is appreciated :slight_smile:

dont use break inside if condition, may be testcases are not done
for n == 1: your code can print twice

1 Like

Ohh okay, got it thanks!