DP - 17: Minimum Coin Change Problem | Min coins required to make given sum with given coins

Опубликовано: 01 Октябрь 2024
на канале: Coding Simplified
4,505
62

Source Code:https://thecodingsimplified.com/minim...
Solution:
- We solve it using DP Bottom up solution
- For every coin, either we include this or we exclude this coin to make given sum
- To find minimum coins required, we get the minimum of both solution (including, excluding)
- We take 2d array to storage values & once we're done, we return the last column last row value as answer

Time Complexity: O(number of coins * given sum)
Space Complexity: O(number of coins * given sum)

Do Watch video for more info

CHECK OUT CODING SIMPLIFIED
   / codingsimplified  

★☆★ VIEW THE BLOG POST: ★☆★
http://thecodingsimplified.com

I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 400+ videos.

★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★
https://www.youtube.com/codingsimplif...

★☆★ Send us mail at: ★☆★
Email: [email protected]