From 001cab5697019a07d6abf48d51ea60686b0ff001 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Thu, 2 Jul 2015 23:07:55 -0400 Subject: [PATCH] Polish sort stack challenge. --- .../sort_stack/sort_stack_challenge.ipynb | 27 +++++++++++++++---- .../sort_stack/sort_stack_solution.ipynb | 14 +++++++--- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/stacks_queues/sort_stack/sort_stack_challenge.ipynb b/stacks_queues/sort_stack/sort_stack_challenge.ipynb index baac67c..bb60c98 100644 --- a/stacks_queues/sort_stack/sort_stack_challenge.ipynb +++ b/stacks_queues/sort_stack/sort_stack_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", "* When sorted, should the largest element be at the top or bottom?\n", " * Top\n", @@ -54,7 +62,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/stacks_queues/sort_stack/sort_stack_solution.ipynb). If you are stuck and need a hint, the solution notebook's algorithm discussion might be a good place to start." ] }, { @@ -97,7 +105,7 @@ "source": [ "## Unit Test\n", "\n", - "*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.**" ] @@ -151,6 +159,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/stacks_queues/sort_stack/sort_stack_solution.ipynb) for a discussion on algorithms and code solutions." + ] } ], "metadata": { diff --git a/stacks_queues/sort_stack/sort_stack_solution.ipynb b/stacks_queues/sort_stack/sort_stack_solution.ipynb index fae0823..03aa71a 100644 --- a/stacks_queues/sort_stack/sort_stack_solution.ipynb +++ b/stacks_queues/sort_stack/sort_stack_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", "* When sorted, should the largest element be at the top or bottom?\n", " * Top\n", @@ -111,8 +118,7 @@ "metadata": {}, "source": [ "## Unit Test\n", - "\n", - "*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" ] }, {