Commit 739b78c6 authored by Tommy Marrinan's avatar Tommy Marrinan
Browse files

update function sort

parent 52206d18
......@@ -15,18 +15,9 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"orginal myarray [80, 75, 59, 69, 10, 94, 100, 20, 85, 69]\n",
"sorted myarray [10, 20, 59, 69, 69, 75, 80, 85, 94, 100]\n"
]
}
],
"outputs": [],
"source": [
"# Original: one-time sort with loops\n",
"import random\n",
......@@ -51,25 +42,9 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"orginal arr1 []\n",
"sorted arr1 []\n",
"\n",
"orginal arr2 []\n",
"sorted arr2 []\n",
"\n",
"orginal arr3 []\n",
"sorted arr3 []\n"
]
}
],
"outputs": [],
"source": [
"# Now sort using functions!\n",
"\n",
......@@ -116,18 +91,9 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"'the morse code' has different chars from 'here come dots'\n",
"'the morse code' has different chars from 'a decimal this'\n"
]
}
],
"outputs": [],
"source": [
"string1 = \"the morse code\"\n",
"string2 = \"here come dots\"\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment