Master Data Structures & Algorithms For FREE at AlgoMap.io!
@adilmolzhigitov438125 күн бұрын
Thanks, that was really good explanation. After watching your tutorials I also started actively using Paint when solving leetcode
@yingxie997410 күн бұрын
Thanks for great explanation ! I like your smile !
@ibraheem_Zain7 ай бұрын
That was clear as sun and helpful even if you use python. Thanks sir you are awesome 👍😎❤
@GregHogg7 ай бұрын
Awesome super glad it was helpful 😊
@tarilonte5 ай бұрын
Your explanation is cristal clear! Thanks a lot for this great video!
@dp8jlАй бұрын
Used to think this is a backtracking question 😂 and failed multiple times, thanks for a great explanation
@Alex-tm5hr6 ай бұрын
Great job, imo better than neetcode's solution for the draw out part
@GregHogg6 ай бұрын
Yay!
@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_JJANG3 ай бұрын
I also don't think we need sorting
@arnobchowdhury96412 ай бұрын
Sorting is important for breaking out of the loop early. Check line 15 and 16.
@darshandani15 ай бұрын
Great explanation ! Thanks !
@mansurischanov32045 ай бұрын
thanks dude, this makes so much sense now!
@GregHogg5 ай бұрын
Glad to hear it, this is a tricky one!
@ayushdey53427 ай бұрын
what is the name of the blackboard app that you use to draw stuff? its really good looking
@GregHogg7 ай бұрын
Yes it's awesome. It's miro
@new-anointingaremu35977 ай бұрын
This explanation is great thanks a lot
@GregHogg7 ай бұрын
Awesome happy to hear it!
@carefree_ladka3 ай бұрын
Sorting is O(NlogN). Why didn't we consider this in time complexity?
@ArtyomKonoplya2 ай бұрын
cause len(coins) way too smaller than amount value
@Krish-hk1bt3 ай бұрын
hei, you are saying "smallest number of ways to make a coin" , isn't it the "minimum number of coins"?
@astronautgamer347 ай бұрын
plz explain coin change two it so hard for me to understand
@GregHogg7 ай бұрын
I haven't solved this, I'll have to take a look at some point :)
@adesopekingsley99677 ай бұрын
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