Skip to content

Instantly share code, notes, and snippets.

View jserle's full-sized avatar

Jonathan Serle jserle

View GitHub Profile
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);
@jserle
jserle / test.js
Created July 24, 2018 05:44
Test
// 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
//
<?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))) {