Answer: Adobe OA Question 2024 March | Dynamic Programming | on-campus
Answer · Posted Jun 2026
Solution : Coin Change — Dynamic Programming Approach This is a classic optimization problem that can be solved using **Dynamic Programming (Bottom-Up)**. We define a 1D DP array dp of size amount + 1, where dp[i] represents the minimum number of coins needed to make up the amount i. We initialize all DP states to a default value of amount + 1 (which acts as infinity) except for dp[0] = 0 (since 0 coins are needed to make amount 0). ...
The full answer & interview discussion are available to premium members.
Log in Create a free account