Polish stack min challenge and solution (#72)

Update constraints, algorithm discussion, code, and tests.
This commit is contained in:
Donne Martin
2016-06-20 06:54:08 -04:00
committed by GitHub
parent 98ad50edaf
commit e71b280082
3 changed files with 28 additions and 20 deletions

View File

@@ -5,7 +5,7 @@ class TestStackMin(object):
def test_stack_min(self):
print('Test: Push on empty stack, non-empty stack')
stack = MyStack()
stack = StackMin()
stack.push(5)
assert_equal(stack.peek(), 5)
assert_equal(stack.min(), 5)