You need to add more test cases

I have solved the problem by 2 diff approaches the brute force one was not optimised hence it did not give output for more than n=8; but still it passed all the test cases.

I have now solved the prob, just wanted to share :slight_smile:

hello @laksh.rustagi12

this problem is for beginners thats why they have kept time constraint very loose.

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.