Fixed pull request changes

This commit is contained in:
mrb00l34n
2015-07-22 11:31:38 -04:00
parent 3370106d36
commit e8de164d9d
4 changed files with 27 additions and 27 deletions

View File

@@ -34,9 +34,9 @@
"source": [
"## Explanation\n",
"\n",
"How many ways are there of making change for n, given k distinct coins? For example:\n",
"How many ways are there of making change for n, given an array of distinct coins? For example:\n",
"\n",
"Input: n = 4, k = 2, coins = [1,2]\n",
"Input: n = 4, coins = [1, 2]\n",
"\n",
"Output: 3. 1+1+1+1, 1+2+1, 2+2, would be the ways of making change.\n",
"\n",
@@ -49,9 +49,9 @@
"source": [
"## Test Cases\n",
"\n",
"* Input: n = 0, k = 2, coins = [1,2] -> Output: 0\n",
"* Input: n = 100, k = 3, coins = [1,2,3] -> Output: 884\n",
"* Input: n = 1000, k = 100, coins = [1,2,3...99,100] -> Output: 15658181104580771094597751280645\n"
"* Input: n = 0, coins = [1, 2] -> Output: 0\n",
"* Input: n = 100, coins = [1, 2, 3] -> Output: 884\n",
"* Input: n = 1000, coins = [1, 2, 3...99, 100] -> Output: 15658181104580771094597751280645\n"
]
},
{
@@ -78,7 +78,7 @@
},
"outputs": [],
"source": [
"def change_ways(n,k,coins):\n",
"def change_ways(n, coins):\n",
" # TODO: Implement me\n",
" return n"
]
@@ -115,9 +115,9 @@
"class Challenge(object):\n",
"\n",
" def test_coinchange_ways(self,solution):\n",
" assert_equal(solution(0,2,[1,2]), 0)\n",
" assert_equal(solution(100,3,[1,2,3]), 884)\n",
" assert_equal(solution(1000,100,range(1,101)), 15658181104580771094597751280645)\n",
" assert_equal(solution(0, [1, 2]), 0)\n",
" assert_equal(solution(100, [1, 2, 3]), 884)\n",
" assert_equal(solution(1000, range(1, 101)), 15658181104580771094597751280645)\n",
" print('Success: test_coinchange_ways')\n",
"\n",
"\n",