mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Update remove dupes unit test to handle more cases.
This commit is contained in:
parent
71cb434de7
commit
27a0bf786e
|
@ -141,6 +141,9 @@
|
||||||
"\n",
|
"\n",
|
||||||
" print('Test: General case, duplicates')\n",
|
" print('Test: General case, duplicates')\n",
|
||||||
" linked_list.insert_to_front(1)\n",
|
" linked_list.insert_to_front(1)\n",
|
||||||
|
" linked_list.insert_to_front(1)\n",
|
||||||
|
" linked_list.insert_to_front(3)\n",
|
||||||
|
" linked_list.insert_to_front(2)\n",
|
||||||
" linked_list.insert_to_front(3)\n",
|
" linked_list.insert_to_front(3)\n",
|
||||||
" linked_list.insert_to_front(1)\n",
|
" linked_list.insert_to_front(1)\n",
|
||||||
" linked_list.insert_to_front(1)\n",
|
" linked_list.insert_to_front(1)\n",
|
||||||
|
@ -176,21 +179,21 @@
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 2",
|
"display_name": "Python 3",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python2"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
"language_info": {
|
"language_info": {
|
||||||
"codemirror_mode": {
|
"codemirror_mode": {
|
||||||
"name": "ipython",
|
"name": "ipython",
|
||||||
"version": 2
|
"version": 3
|
||||||
},
|
},
|
||||||
"file_extension": ".py",
|
"file_extension": ".py",
|
||||||
"mimetype": "text/x-python",
|
"mimetype": "text/x-python",
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython2",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "2.7.10"
|
"version": "3.4.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|
|
@ -191,6 +191,9 @@
|
||||||
"\n",
|
"\n",
|
||||||
" print('Test: General case, duplicates')\n",
|
" print('Test: General case, duplicates')\n",
|
||||||
" linked_list.insert_to_front(1)\n",
|
" linked_list.insert_to_front(1)\n",
|
||||||
|
" linked_list.insert_to_front(1)\n",
|
||||||
|
" linked_list.insert_to_front(3)\n",
|
||||||
|
" linked_list.insert_to_front(2)\n",
|
||||||
" linked_list.insert_to_front(3)\n",
|
" linked_list.insert_to_front(3)\n",
|
||||||
" linked_list.insert_to_front(1)\n",
|
" linked_list.insert_to_front(1)\n",
|
||||||
" linked_list.insert_to_front(1)\n",
|
" linked_list.insert_to_front(1)\n",
|
||||||
|
@ -241,21 +244,21 @@
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 2",
|
"display_name": "Python 3",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python2"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
"language_info": {
|
"language_info": {
|
||||||
"codemirror_mode": {
|
"codemirror_mode": {
|
||||||
"name": "ipython",
|
"name": "ipython",
|
||||||
"version": 2
|
"version": 3
|
||||||
},
|
},
|
||||||
"file_extension": ".py",
|
"file_extension": ".py",
|
||||||
"mimetype": "text/x-python",
|
"mimetype": "text/x-python",
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython2",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "2.7.10"
|
"version": "3.4.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|
|
@ -15,6 +15,9 @@ class TestRemoveDupes(object):
|
||||||
|
|
||||||
print('Test: General case, duplicates')
|
print('Test: General case, duplicates')
|
||||||
linked_list.insert_to_front(1)
|
linked_list.insert_to_front(1)
|
||||||
|
linked_list.insert_to_front(1)
|
||||||
|
linked_list.insert_to_front(3)
|
||||||
|
linked_list.insert_to_front(2)
|
||||||
linked_list.insert_to_front(3)
|
linked_list.insert_to_front(3)
|
||||||
linked_list.insert_to_front(1)
|
linked_list.insert_to_front(1)
|
||||||
linked_list.insert_to_front(1)
|
linked_list.insert_to_front(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user