I am getting a correct answer for custom testcases as well.
Not able to figure out the mistake.
Working for the testcases, but wrong answer on submission. I tried it by using the method shown in hint video
Can the numbers be repeated?
Because in the question it says “permutation of n natural numbers”
Oh my bad i opened a wrong problem, please wait i got the right problem now. Debugging it.
It seems fine, try to submit this code again
Seems only output error Rest everything works fine.
The last code I submitted got accepted… but I didn’t understand what was wrong with the earlier ones
I just got the last code you have submitted and it shows 100% result. Though if the logic of both the code is correct then there’s no worry sometime it take time to show your score. You can mark this doubt as resolved cause you have successfully submitted the solution for this problem.
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.