krm24's blog

By krm24, 4 years ago, In English

I was solving CSES problem (Coin Combinations II) and oddly it gave TLE when I made the dp array as dp[x+1][n] and gave correct ans when it was changed to dp[n][x+1].

Problem TLE Code Correct Code

Full text and comments »

  • Vote: I like it
  • +10
  • Vote: I do not like it