Greedy Algorithm to find minimum number of Coins | GeeksforGeeks

preview_player
Показать описание


This video is contributed by Ishmeet Kaur

Please Like, Comment and Share the Video among your friends.

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

though my comment was removed, I am happy to see the change in the time complexity now .

thanking for modifying it . Great job guys :)

santhoshcts
Автор

why are u using vector can't we use list there?

jatinyadav
Автор

I'm not able to understand the function void findMin. What is n? How is it checking first for 1000, then for 500 and so on.

parasjain
Автор

note proper work to given test case like [1]
1 outPut ==> -1

darshankalathiya
Автор

this approach doesn't give correct result for the following test case:
coins=[186, 419, 83, 408]
amount=6249

pranjlisingh
Автор

@Geeksforgeeks if I have set of {1, 9, 5, 6} and I want 11rs ...Then how this solution will work?

amanjhurani
Автор

what if changes are [1, 2, 10, 15, 20] and value is 25.

akhilkumark
Автор

Say my denomination array was {4, 10, 25} and I wanted change for a value of 41. How would that work?

aneeshbose
Автор

How this solution will work for {2} and amount 3?

devanggandhi
Автор

Hi madam How 1, 2, 5, 10, 20, 50, 70 for Input value 70

onlineyogaclasses
Автор

she has used basically word 10 times .

rahulratra
Автор

Completely wrong solution and absolutely wrong time complexity!!!

rohansinghchauhan
Автор

but dynamic programing is the proper approach

ajinkyadeshpande
welcome to shbcf.ru