Questions tagged [coin-change]

All problems (regardless of currency) with making change from a given amount of currency into a number of coins and bills of varying denominations.

All problems with making change from a given amount of currency into a number of coins and bills of varying denominations.

For example, finding the correct number of $20, $10, $5, $1 bills and $0.25, $0.10, $0.05, and $0.01 coins that add up to a given sum.

Variations of the problem are to find any solution, all the solutions, the one with the least number of coins / bills, or with a specific number of them.

260 questions
-3
votes
1 answer

How can i program a recursive coin change in c++?

I'm trying to build a recursive call for coin change in c++ . i tried most of the algorithm on the internet but it doesn't seem to apply with vector or it doesn't out the sums of the coin used. Can anyone help me understand what the recursive…
Darkflame
  • 79
  • 2
  • 11
-4
votes
6 answers

Python function: Find Change from purchase amount

I'm looking for the most efficient way to figure out a change amount (Quarters, dimes, nickels, and pennies) from a purchase amount. The purchase amount must be less than $1, and the change is from one dollar. I need to know how many quarters,…
Jb.
  • 109
  • 2
  • 2
  • 9
-4
votes
1 answer

Coin change with the type of specific coin as the returned value

I need to write this function that calculates the minimum number of the coins to get the specified value. the function as a parameter has a value (int) and an string the has information about the type of coin and its value (its a bit different from…
totoro
  • 109
  • 2
  • 9
-5
votes
1 answer

is it possible to get portfolio balance data from any Coinbase account without using api?

is it possible to get portfolio balance data from any Coinbase account using only email or without using coinbase api. please help me. i need this method to make an software . that help me to show my . all account balances without any api.
Ali Dev
  • 1
  • 1
-5
votes
2 answers

Coin Change Problems

Suppose I have 4 coins of denominations 1 3 4 5. I want to make it 7. I learn how to find how many possible ways that can be done. But I want to determine what is the minimum number of coins that must be used to do that. Example: 5+1+1=7 again…
Akash
  • 1
  • 2
1 2 3
17
18