Dynamic Programming : Number of ways to.….

Sweta Barman
2 min readDec 28, 2020

When it comes to solving questions asking for the number of ways to be king of the world, or something simpler — the number of ways to generate a specific coin change — use Dynamic programming.

Question from Elements of Programming interviews :

In a game, a play may lead up to 2 points, or 3 points, or 7 points. Many different combinations of 2 points, 3 points, or 7 points can lead to a final score.

Amount = 12, Point options : {2, 3, 7}

--

--

Sweta Barman

I’m a software engineer with a strong interest in algorithms. I love solving puzzles and love the aha moment of arriving at a solution after hours of struggle.