mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-06 17:38:02 +00:00
Fix #13, PEP8-ify notebooks.
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Can you insert None values in the list?\n",
|
||||
@@ -94,7 +93,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"class MyLinkedList(LinkedList):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def remove_dupes(self):\n",
|
||||
" # TODO: Implement me\n",
|
||||
" pass"
|
||||
@@ -129,7 +128,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"class TestRemoveDupes(object):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def test_remove_dupes(self, linked_list):\n",
|
||||
" print('Test: Empty list')\n",
|
||||
" linked_list.remove_dupes()\n",
|
||||
@@ -151,14 +150,16 @@
|
||||
" print('Test: General case, no duplicates')\n",
|
||||
" linked_list.remove_dupes()\n",
|
||||
" assert_equal(linked_list.get_all_data(), [1, 3, 2])\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" print('Success: test_remove_dupes\\n')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = TestRemoveDupes()\n",
|
||||
" linked_list = MyLinkedList(None)\n",
|
||||
" test.test_remove_dupes(linked_list)\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"\n",
|
||||
"if __name__ == '__main__':\n",
|
||||
" main()"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user