I was solving Book Shop of CSES DP section.
- I am getting TLE even after multiple attempts, Can you tell me how to optimize my TOP-DOWN approach.
- I have tried replacing 2-d array with 2-d vector .
- I have also tried swapping the dimensions of dp array (_some caching thing_).
my code