From f74d40926c8d83c2bafb809e83343a57877fd44a Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Sun, 9 Aug 2015 07:25:08 -0400 Subject: [PATCH] Renamed coinchange to coin_change. --- README.md | 2 +- .../coinchange_ways_challenge.ipynb | 12 ++++++------ .../coinchange_ways/coinchange_ways_solution.ipynb | 14 +++++++------- .../coinchange_ways/test_coinchange_ways.py | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 7385377..424db4a 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ Challenges, solutions, and unit tests are presented in the form of **IPython/Jup |--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------| | Implement fibonacci recursively, dynamically, and iteratively | [Challenge](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/fibonacci/fibonacci_challenge.ipynb)│[Solution](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/fibonacci/fibonacci_solution.ipynb) | | Implement the Towers of Hanoi with 3 towers and N disks | [Challenge](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/hanoi/hanoi_challenge.ipynb)│[Solution](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/hanoi/hanoi_solution.ipynb) | -| Find the number of ways to represent n cents given an array of coins | [Challenge](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/coinchange_ways/coinchange_ways_challenge.ipynb)│[Solution](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/coinchange_ways/coinchange_ways_solution.ipynb) | +| Find the number of ways to represent n cents given an array of coins | [Challenge](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/coin_change_ways/coin_change_ways_challenge.ipynb)│[Solution](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/coin_change_ways/coin_change_ways_solution.ipynb) | | Implement factorial recursively, dynamically, and iteratively | [Contribute](https://github.com/donnemartin/interactive-coding-challenges/blob/master/CONTRIBUTING.md)│[Contribute](https://github.com/donnemartin/interactive-coding-challenges/blob/master/CONTRIBUTING.md) | | Perform a binary search on a sorted array of integers | [Contribute](https://github.com/donnemartin/interactive-coding-challenges/blob/master/CONTRIBUTING.md)│[Contribute](https://github.com/donnemartin/interactive-coding-challenges/blob/master/CONTRIBUTING.md) | | Print all subsets of a set | [Contribute](https://github.com/donnemartin/interactive-coding-challenges/blob/master/CONTRIBUTING.md)│[Contribute](https://github.com/donnemartin/interactive-coding-challenges/blob/master/CONTRIBUTING.md) | diff --git a/recursion_dynamic/coinchange_ways/coinchange_ways_challenge.ipynb b/recursion_dynamic/coinchange_ways/coinchange_ways_challenge.ipynb index 214bd8f..a977dd4 100644 --- a/recursion_dynamic/coinchange_ways/coinchange_ways_challenge.ipynb +++ b/recursion_dynamic/coinchange_ways/coinchange_ways_challenge.ipynb @@ -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." ] } ], diff --git a/recursion_dynamic/coinchange_ways/coinchange_ways_solution.ipynb b/recursion_dynamic/coinchange_ways/coinchange_ways_solution.ipynb index c8706fd..d2d097c 100644 --- a/recursion_dynamic/coinchange_ways/coinchange_ways_solution.ipynb +++ b/recursion_dynamic/coinchange_ways/coinchange_ways_solution.ipynb @@ -100,27 +100,27 @@ "name": "stdout", "output_type": "stream", "text": [ - "Overwriting test_coinchange_ways.py\n" + "Overwriting test_coin_change_ways.py\n" ] } ], "source": [ - "%%writefile test_coinchange_ways.py\n", + "%%writefile 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", @@ -138,12 +138,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "Success: test_coinchange_ways\n" + "Success: test_coin_change_ways\n" ] } ], "source": [ - "%run -i test_coinchange_ways.py" + "%run -i test_coin_change_ways.py" ] }, { diff --git a/recursion_dynamic/coinchange_ways/test_coinchange_ways.py b/recursion_dynamic/coinchange_ways/test_coinchange_ways.py index 2e9d0a2..7c3714f 100644 --- a/recursion_dynamic/coinchange_ways/test_coinchange_ways.py +++ b/recursion_dynamic/coinchange_ways/test_coinchange_ways.py @@ -3,16 +3,16 @@ from nose.tools import assert_equal class Challenge(object): - def test_coinchange_ways(self,solution): + def test_coin_change_ways(self,solution): assert_equal(solution(0, [1, 2]), 0) assert_equal(solution(100, [1, 2, 3]), 884) assert_equal(solution(1000, range(1, 101)), 15658181104580771094597751280645) - print('Success: test_coinchange_ways') + print('Success: test_coin_change_ways') def main(): test = Challenge() - test.test_coinchange_ways(change_ways) + test.test_coin_change_ways(change_ways) if __name__ == '__main__':