code link: https://ideone.com/mjPrLO
Getting TLE (in one case) on using array.
1 case TLE in Exchange coins
@pragyanvarshney
hello pragyan,
we can not make array of size 10^9 .it will cause memory limit exceeded issue.
so map + top down dp will be a better option.
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.