Wrong Answer - Simple Enough

I am not being able to test the case in which my code is giving the wrong answer. Please help!
Code: https://ide.codingblocks.com/s/201112

@ria_jhaX5P Your solution is not optimal please use dp in this problem otherwise it might cause tle .

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.

1 Like