From 921574fd4f2b371e9cbd3d5dd0a754af73acbe48 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Fri, 3 Jul 2015 20:06:13 -0400 Subject: [PATCH] Tweaked add reverse solution. --- .../add_reverse/add_reverse_challenge.ipynb | 27 +++++++++++++++---- .../add_reverse/add_reverse_solution.ipynb | 18 ++++++------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/linked_lists/add_reverse/add_reverse_challenge.ipynb b/linked_lists/add_reverse/add_reverse_challenge.ipynb index a3aceab..0cd1602 100644 --- a/linked_lists/add_reverse/add_reverse_challenge.ipynb +++ b/linked_lists/add_reverse/add_reverse_challenge.ipynb @@ -4,7 +4,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook was prepared by [Donne Martin](http://donnemartin.com). Source and license info is on [GitHub](https://bit.ly/code-notes)." + "This notebook was prepared by [Donne Martin](http://donnemartin.com). Source and license info is on [GitHub](https://github.com/donnemartin/coding-challenges)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Challenge Notebook" ] }, { @@ -17,7 +24,8 @@ "* [Test Cases](#Test-Cases)\n", "* [Algorithm](#Algorithm)\n", "* [Code](#Code)\n", - "* [Unit Test](#Unit-Test)" + "* [Unit Test](#Unit-Test)\n", + "* [Solution Notebook](#Solution-Notebook)" ] }, { @@ -26,7 +34,7 @@ "source": [ "## Constraints\n", "\n", - "*Problem statements are often intentionally ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n", + "*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n", "\n", "* Do you expect the return to be in reverse order too?\n", " * Yes\n", @@ -60,7 +68,7 @@ "source": [ "## Algorithm\n", "\n", - "Refer to the solution notebook. 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/coding-challenges/blob/master/linked_lists/add_reverse/add_reverse_solution.ipynb). If you are stuck and need a hint, the solution notebook's algorithm discussion might be a good place to start." ] }, { @@ -108,7 +116,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "*It is important to identify and run through general and edge cases from the [Test Cases](#Test-Cases) section by hand. You generally will not be asked to write a unit test like what is shown below.*\n", + "\n", "\n", "**The following unit test is expected to fail until you solve the challenge.**" ] @@ -169,6 +177,15 @@ "if __name__ == '__main__':\n", " main()" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Solution Notebook\n", + "\n", + "Review the [Solution Notebook](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/add_reverse/add_reverse_solution.ipynb) for a discussion on algorithms and code solutions." + ] } ], "metadata": { diff --git a/linked_lists/add_reverse/add_reverse_solution.ipynb b/linked_lists/add_reverse/add_reverse_solution.ipynb index 41a5d3c..93a0668 100644 --- a/linked_lists/add_reverse/add_reverse_solution.ipynb +++ b/linked_lists/add_reverse/add_reverse_solution.ipynb @@ -4,7 +4,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook was prepared by [Donne Martin](http://donnemartin.com). Source and license info is on [GitHub](https://bit.ly/code-notes)." + "This notebook was prepared by [Donne Martin](http://donnemartin.com). Source and license info is on [GitHub](https://github.com/donnemartin/coding-challenges)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Solution Notebook" ] }, { @@ -26,7 +33,7 @@ "source": [ "## Constraints\n", "\n", - "*Problem statements are often intentionally ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n", + "*Problem statements are sometimes ambiguous. Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n", "\n", "* Do you expect the return to be in reverse order too?\n", " * Yes\n", @@ -146,13 +153,6 @@ "## Unit Test" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "*It is important to identify and run through general and edge cases from the [Test Cases](#Test-Cases) section by hand. You generally will not be asked to write a unit test like what is shown below.*" - ] - }, { "cell_type": "code", "execution_count": 3,