Пример #1
0
testStack = DataStructures.Stack()
print "pushing 5"
testStack.push(5)
print "pushing 6"
testStack.push(6)
print "pushing 7"
testStack.push(7)
print testStack.pop()
print testStack.pop()
print "pushing 8"
testStack.push(8)
print testStack.pop()
print testStack.pop()

print "\nTESTING: QUEUE\n----------"
testQueue = DataStructures.Queue()
print "queueing 0"
testQueue.enqueue(0)
print "queueing 1"
testQueue.enqueue(1)
print "queueing 2"
testQueue.enqueue(2)
print testQueue.dequeue()
print "queueing 3"
testQueue.enqueue(3)
print testQueue.dequeue()
print testQueue.dequeue()
print testQueue.dequeue()

print "\nTESTING: LIST\n----------"
testList = DataStructures.List(10)