Here is my code:
It was giving TLE using recursion so i tried using dp. It still passes only test case 3. Please check
Only passing test case 3
its working now…thanks a ton for your help
Here is my code:
It was giving TLE using recursion so i tried using dp. It still passes only test case 3. Please check
its working now…thanks a ton for your help