mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-15 05:48:03 +00:00
Renamed coinchange to coin_change.
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
"source": [
|
||||
"## Algorithm\n",
|
||||
"\n",
|
||||
"Refer to the [Solution Notebook](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/coinchange_ways/coinchange_ways_solution.ipynb). If you are stuck and need a hint, the solution notebook's algorithm discussion might be a good place to start."
|
||||
"Refer to the [Solution Notebook](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/coin_change_ways/coin_change_ways_solution.ipynb). If you are stuck and need a hint, the solution notebook's algorithm discussion might be a good place to start."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -108,22 +108,22 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# %load test_coinchange_ways.py\n",
|
||||
"# %load test_coin_change_ways.py\n",
|
||||
"from nose.tools import assert_equal\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"class Challenge(object):\n",
|
||||
"\n",
|
||||
" def test_coinchange_ways(self,solution):\n",
|
||||
" def test_coin_change_ways(self,solution):\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",
|
||||
" print('Success: test_coin_change_ways')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = Challenge()\n",
|
||||
" test.test_coinchange_ways(change_ways)\n",
|
||||
" test.test_coin_change_ways(change_ways)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"if __name__ == '__main__':\n",
|
||||
@@ -136,7 +136,7 @@
|
||||
"source": [
|
||||
"## Solution Notebook\n",
|
||||
"\n",
|
||||
"Review the [Solution Notebook](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/coinchange_ways/coinchange_ways_solution.ipynb) for a discussion on algorithms and code solutions."
|
||||
"Review the [Solution Notebook](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/coin_change_ways/coin_change_ways_solution.ipynb) for a discussion on algorithms and code solutions."
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user