Skip to content

Commit

Permalink
[chore] update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gitgik committed Nov 20, 2020
1 parent da3188a commit 72c2862
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ A catalogue of data structures implementation + algorithms and coding problems a
- [Recursive binary search](recursion/recursive_binary_search.ipynb)
- [Simulate rocket countdown](recursion/simulate_rocket_countdown.ipynb)
- [Find min and max in array](recursion/min_max.ipynb)
- [Tower of Hanoi](recursion/tower_of_hanoi.ipynb)

## Searching

Expand Down
47 changes: 47 additions & 0 deletions recursion/tower_of_hanoi.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,53 @@
"tower_of_hanoi(3, 1, 2, 3)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Moving 1 to 3\n",
"Moving 1 to 2\n",
"Moving 3 to 2\n",
"Moving 1 to 3\n",
"Moving 2 to 1\n",
"Moving 2 to 3\n",
"Moving 1 to 3\n",
"Moving 1 to 2\n",
"Moving 3 to 2\n",
"Moving 3 to 1\n",
"Moving 2 to 1\n",
"Moving 3 to 2\n",
"Moving 1 to 3\n",
"Moving 1 to 2\n",
"Moving 3 to 2\n",
"Moving 1 to 3\n",
"Moving 2 to 1\n",
"Moving 2 to 3\n",
"Moving 1 to 3\n",
"Moving 2 to 1\n",
"Moving 3 to 2\n",
"Moving 3 to 1\n",
"Moving 2 to 1\n",
"Moving 2 to 3\n",
"Moving 1 to 3\n",
"Moving 1 to 2\n",
"Moving 3 to 2\n",
"Moving 1 to 3\n",
"Moving 2 to 1\n",
"Moving 2 to 3\n",
"Moving 1 to 3\n"
]
}
],
"source": [
"tower_of_hanoi(5, a=1, b=2, c=3)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 72c2862

Please sign in to comment.