Why Greedy Approach will fail for Coin Change problem?
Prateek Bhaiya says greedy approach will fail here
take a example coin set (1,7,10) and we have to make 15
greedy approach ans - 10+1+1+1+1+1 = 6 coins
while ans is 7+7+1 = 3 coins
@rssrivastavarohan
Vatsal bro can you please look me for this : what is the error already I have defined vector class
Questions is : Next Greater Element
hey can you send the question link too
@rssrivastavarohan i have removed the error but your logic is wrong it will always give -1 for all in the output https://ide.codingblocks.com/s/235372
bro this is the questions link:
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.