Polish stack challenge and solution (#69)

Update constraints and code.
This commit is contained in:
Donne Martin
2016-06-19 20:02:53 -04:00
committed by GitHub
parent c2bd267816
commit 4cdb85e22d
3 changed files with 16 additions and 12 deletions

View File

@@ -11,8 +11,7 @@ class Stack(object):
self.top = top
def push(self, data):
node = Node(data, self.top)
self.top = node
self.top = Node(data, self.top)
def pop(self):
if self.top is None: