All Questions
Tagged with dynamic-programming change-making-problem
7 questions
1
vote
1
answer
2k
views
Project Euler Problem 31 (Coin Sum)
I just finished Project Euler 31: Coin sums, which asks how many ways there are to make £2 using British coins (1p, 2p, 5p, 10p, 20p, 50p, £1, and £2).
When I compared my code and the problem review'...
-3
votes
1
answer
3k
views
Counting the number of ways to break an amount into coins
I have an algorithm here that counts the number of ways that n cents can be represented using the following denominations:
quarter: 25 cents
dime: 10 cents
nickel: 5 cents
pennies: 1 cent
There are ...
2
votes
1
answer
1k
views
Coin Change Problem with Memoization
Purpose
Another take on the classic Change-making Problem:
Given some set of coins and a value, find the minimum number of coins necessary to add up to this value
In my implementation, instead of ...
2
votes
1
answer
1k
views
Coin change with Dynamic Programming
I have made an implementation of coin change problem solved with Dynamic Programming. Could you guys help with renaming some method and variables?
Here is my implementation -
...
6
votes
1
answer
3k
views
Coin change algorithm
I've implemented the coin change algorithm using Dynamic Programming and Greedy Algorithm w/ backtracking. The description is as follows:
Given an amount of change (n) list all of the possibilities ...
5
votes
2
answers
2k
views
Change-making problem with specific constraints
I am a new Pythoner. I have solved a OJ project with Python. Can you tell me how can I solve it more Pythonically?
Problem Description: There are n coin denominations, each with an unlimited supply ...
11
votes
3
answers
3k
views
Coin Change: Minimum number of coins
Problem:
You are given n types of coin denominations of values \$v(1) < v(2) < ... < v(n)\$ (all integers). Assume \$v(1) = 1\$, so you can always make change for any amount of money \$C\$....