# CMPUT 175 Winter 2013 Lab 4 Exercise 3...
# CMPUT 175 Winter 2013 Lab 4 Exercise 3# A Stack
Showing 1 out of 1
# CMPUT 175 Winter 2013 Lab 4 Exercise 3# A Stack
# CMPUT 175 Winter 2013 Lab 4 Exercise 3# A Stack
# CMPUT 175 Winter 2013 Lab 4 Exerc...
# CMPUT 175 Winter 2013 Lab 4 Exercise 3# A Stack
# CMPUT 175 Winter 2013 Lab 4 Exercise 3
# A Stack implementation
class Stack:
def __init__(self):
self.__items = []
def push(self, item):
self.__items.append(item)
def pop(self):
return self.__items.pop()
def peek(self):
return self.__items[len(self.__items)-1]
def is_empty(self):
return len(self.__items) == 0
def size(self):
return len(self.__items)
Ace your assessments! Get Better Grades
Browse thousands of Study Materials & Solutions from your Favorite Schools
University of Alberta
University_of_Alberta
School:
Foundations_of_Computiation_II
Course:
Great resource for chem class. Had all the past labs and assignments
Leland P.
Santa Clara University
Introducing Study Plan
Using AI Tools to Help you understand and remember your course concepts better and faster than any other resource.
Find the best videos to learn every concept in that course from Youtube and Tiktok without searching.
Save All Relavent Videos & Materials and access anytime and anywhere
Prepare Smart and Guarantee better grades

Students also viewed documents