mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-17 06:48:03 +00:00
Fix #13, PEP8-ify notebooks.
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
|
||||
"* Are the stacks and array a fixed size?\n",
|
||||
" * Yes"
|
||||
]
|
||||
@@ -77,7 +76,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"class Stacks(object):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def __init__(self, num_stacks, stack_size):\n",
|
||||
" # TODO: Implement me\n",
|
||||
" pass\n",
|
||||
@@ -120,7 +119,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"class TestStacks(object):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" @raises(Exception)\n",
|
||||
" def test_pop_on_empty(self, num_stacks, stack_size):\n",
|
||||
" print('Test: Pop on empty stack')\n",
|
||||
@@ -151,14 +150,16 @@
|
||||
"\n",
|
||||
" print('Success: test_stacks\\n')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" num_stacks = 3\n",
|
||||
" stack_size = 100 \n",
|
||||
" stack_size = 100\n",
|
||||
" test = TestStacks()\n",
|
||||
" test.test_pop_on_empty(num_stacks, stack_size)\n",
|
||||
" test.test_push_on_full(num_stacks, stack_size)\n",
|
||||
" test.test_stacks(num_stacks, stack_size)\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"\n",
|
||||
"if __name__ == '__main__':\n",
|
||||
" main()"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user