Some help with DP optimization

Revision en1, by Adnanboi, 2022-06-28 17:18:38

Hey guys, I've recently been practicing dp and I tried this one problem I really liked, I tried a DP approach on it and it worked but for some reason I still got a TLE, is my memoization a problem? This is my submission btw: 161894502, if someone could please look into my code that'd be great, thank you!

Tags dp, optimization, tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Adnanboi 2022-06-28 17:18:38 395 Initial revision (published)