This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
utils = require('./utils'); | |
function makeChange (moneyAmount, denoms) { | |
let returnData = {}; | |
for (var i in denoms) { | |
let currentCoin = denoms[i]; | |
while (moneyAmount >= currentCoin) { | |
moneyAmount -= currentCoin; | |
utils.setOrBump(returnData, currentCoin); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Thought process notes | |
// | |
// -------------------------------------------- | |
// Step 1. Quick Review of Req's before coding® | |
// -------------------------------------------- | |
// | |
// Requirement 1: method/class/component to calculate sum | |
// of even numbers of fib seq. (each num sub of 2 prev.) | |
// - will need std. recursion with end condition based on current <= 4m | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (empty($argv[1])) { | |
die("\nPetCheck Test App\n----------------------\nType an argument after the script name" | |
. " to determine if it's an int or double.\n\n"); | |
} | |
$in = $argv[1]; | |
if ($in === strval(intval($in))) { |