Coin Change 2 – Dynamic Programming Unbounded Knapsack – Leetcode 518 – Python

Coin Change 2 - Dynamic Programming Unbounded Knapsack - Leetcode 518 - Python

50725 People Read – 815 People Liked – You Can Also Like

๐Ÿš€ https://neetcode.io/ – A better way to prepare for Coding Interviews

๐Ÿฆ Twitter: https://twitter.com/neetcode1
๐Ÿฅท Discord: https://discord.gg/ddjKRXPqtk

๐Ÿฎ Support the channel: https://www.patreon.com/NEETcode

Code on Github: https://github.com/neetcode-gh/leetcode/blob/main/518-coin-change-2.py

โญ BLIND-75 PLAYLIST: https://www.youtube.com/watch?v=KLlXCFG5TnA&list=PLot-Xpze53ldVwtstag2TL4HQhAnC8ATf
๐Ÿ’ก CODING SOLUTIONS: https://www.youtube.com/playlist?list=PLot-Xpze53leF0FeHz2X0aG3zd0mr1AW_
๐Ÿ’ก DYNAMIC PROGRAMMING PLAYLIST: https://www.youtube.com/watch?v=73r3KWiEvyk&list=PLot-Xpze53lcvx_tjrr_m2lgD2NsRHlNO&index=1
๐ŸŒฒ TREE PLAYLIST: https://www.youtube.com/watch?v=OnSn2XEQ4MY&list=PLot-Xpze53ldg4pN6PfzoJY7KsKcxF1jg&index=2
๐Ÿ’ก GRAPH PLAYLIST: https://www.youtube.com/watch?v=EgI5nU9etnU&list=PLot-Xpze53ldBT_7QA8NVot219jFNr_GI
๐Ÿ’ก BACKTRACKING PLAYLIST: https://www.youtube.com/watch?v=pfiQ_PS1g8E&list=PLot-Xpze53lf5C3HSjCnyFghlW0G1HHXo
๐Ÿ’ก LINKED LIST PLAYLIST: https://www.youtube.com/watch?v=G0_I-ZF0S38&list=PLot-Xpze53leU0Ec0VkBhnf4npMRFiNcB&index=2
๐Ÿ’ก BINARY SEARCH PLAYLIST: https://www.youtube.com/playlist?list=PLot-Xpze53leNZQd0iINpD-MAhMOMzWvO
๐Ÿ“š STACK PLAYLIST: https://www.youtube.com/playlist?list=PLot-Xpze53lfxD6l5pAGvCD4nPvWKU8Qo

Problem Link: https://leetcode.com/problems/coin-change-2/

0:00 – Read the problem
2:25 – Brute Force Explained
5:57 – Memoization Explained
8:52 – Naive DP Explained
13:40 – Optimal Space DP Explained
18:15 – Memoization Code
20:10 – O(n*m) Space DP
22:20 – O(n) Space DP

leetcode 518
This question was identified as a facebook interview question from here: https://github.com/xizhengszhang/Leetcode_company_frequency

#unbounded #knapsack #python
Disclosure: Some of the links above may be affiliate links, from which I may earn a small commission.

Youtube

Make Beautify

Coin Change 2 – Dynamic Programming Unbounded Knapsack – Leetcode 518 – Python