CSES Coin Combinations II

Revision en1, by practice_has, 2023-12-11 17:25:59

Can someone tell me what is the difference in logic between the two solutions?

The first solution is accepted by the CSES

Code 1

The second solution is giving TLE

Code 2

The only difference in code is the order of nested for loop

Someone please help!

Tags dynamic programming, cses, iterative dp, recursive dp


  Rev. Lang. By When Δ Comment
en1 English practice_has 2023-12-11 17:25:59 2213 Initial revision (published)