Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
47
var assert = require('assert');
function coinChange(coins, amount) {
// Fill in this method
return 1;
}
try {
assert.equal(coinChange([2, 3, 5], 11), 3);
console.log('PASSED: ' + 'First Test: coinChange([2, 3, 5], 11)');
} catch (err) {
console.log(err);
}
try {
assert.equal(coinChange([2, 3, 5, 7], 17), 3);
console.log('PASSED: ' + 'Second Test: coinChange([2, 3, 5, 7]');
} catch (err) {
console.log(err);
}
try {
assert.equal(coinChange([2, 3, 7], 15), 4);
console.log('PASSED: ' + 'Third Test: coinChange([2, 3, 7], 15)');
OUTPUT
Results will appear here.