Coin Change - Leetcode 322 - Dynamic Programming (Python)

  Рет қаралды 11,369

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 28
@GregHogg
@GregHogg 5 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@adilmolzhigitov4381
@adilmolzhigitov4381 25 күн бұрын
Thanks, that was really good explanation. After watching your tutorials I also started actively using Paint when solving leetcode
@yingxie9974
@yingxie9974 10 күн бұрын
Thanks for great explanation ! I like your smile !
@ibraheem_Zain
@ibraheem_Zain 7 ай бұрын
That was clear as sun and helpful even if you use python. Thanks sir you are awesome 👍😎❤
@GregHogg
@GregHogg 7 ай бұрын
Awesome super glad it was helpful 😊
@tarilonte
@tarilonte 5 ай бұрын
Your explanation is cristal clear! Thanks a lot for this great video!
@dp8jl
@dp8jl Ай бұрын
Used to think this is a backtracking question 😂 and failed multiple times, thanks for a great explanation
@Alex-tm5hr
@Alex-tm5hr 6 ай бұрын
Great job, imo better than neetcode's solution for the draw out part
@GregHogg
@GregHogg 6 ай бұрын
Yay!
@internick_
@internick_ 3 ай бұрын
Why did we have to sort the coins in ascending order? Not sure why it becomes an issue if we always consider every coin, still
@AI_STORY_JJANG
@AI_STORY_JJANG 3 ай бұрын
I also don't think we need sorting
@arnobchowdhury9641
@arnobchowdhury9641 2 ай бұрын
Sorting is important for breaking out of the loop early. Check line 15 and 16.
@darshandani1
@darshandani1 5 ай бұрын
Great explanation ! Thanks !
@mansurischanov3204
@mansurischanov3204 5 ай бұрын
thanks dude, this makes so much sense now!
@GregHogg
@GregHogg 5 ай бұрын
Glad to hear it, this is a tricky one!
@ayushdey5342
@ayushdey5342 7 ай бұрын
what is the name of the blackboard app that you use to draw stuff? its really good looking
@GregHogg
@GregHogg 7 ай бұрын
Yes it's awesome. It's miro
@new-anointingaremu3597
@new-anointingaremu3597 7 ай бұрын
This explanation is great thanks a lot
@GregHogg
@GregHogg 7 ай бұрын
Awesome happy to hear it!
@carefree_ladka
@carefree_ladka 3 ай бұрын
Sorting is O(NlogN). Why didn't we consider this in time complexity?
@ArtyomKonoplya
@ArtyomKonoplya 2 ай бұрын
cause len(coins) way too smaller than amount value
@Krish-hk1bt
@Krish-hk1bt 3 ай бұрын
hei, you are saying "smallest number of ways to make a coin" , isn't it the "minimum number of coins"?
@astronautgamer34
@astronautgamer34 7 ай бұрын
plz explain coin change two it so hard for me to understand
@GregHogg
@GregHogg 7 ай бұрын
I haven't solved this, I'll have to take a look at some point :)
@adesopekingsley9967
@adesopekingsley9967 7 ай бұрын
I was thinking 🤔 We can sort reverse the list then pick the biggest number at index 0 then check if its greater than amount if false, then next but if true subtract from amount index. Check if result is present in the list [can use a set] if flase then call recursion using to repeat using result Example amount 12 List=[1,4,5] List.sort(reverse=True) 12>5.. therefore 12-5= 7 7 not in list and greater than 5 7>5 therefore 7-5=2 2
@贪财
@贪财 7 ай бұрын
$4x3 =$12. So fewest is 3 coins. 5+5+1+1 is 4coins. it cover most but edge
@CGS9_
@CGS9_ 7 ай бұрын
@@贪财 always those edge cases that will get ya
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
Climbing Stairs - Leetcode 70 - Dynamic Programming (Python)
10:54
Number of Islands - Leetcode 200 - Graphs (Python)
11:01
Greg Hogg
Рет қаралды 13 М.
How to Remember Everything You Read
26:12
Justin Sung
Рет қаралды 2,5 МЛН
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 724 М.
one year of studying (it was a mistake)
12:51
Jeffrey Codes
Рет қаралды 147 М.
Coin Change - Dynamic Programming Bottom Up - Leetcode 322
19:23
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 776 М.
LeetCode: The Worst Thing to Happen to Software Engineering
8:03
Coding with Dee
Рет қаралды 155 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.