|
|
|
CMPUT 175 Winter 2013 Lab 4 Exercise 0.docx
CMPUT_175_Winter_2013_Lab_4_Exercise_0.docx
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:
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
lab 18.docx
lab_18.docx
Course
Course
3
Module5QuizSTA2023.d...
Module5QuizSTA2023.docx.docx
Course
Course
10
Week 7 Test Math302....
Week_7_Test_Math302.docx.docx
Course
Course
30
Chapter 1 Assigment ...
Chapter_1_Assigment_Questions.docx.docx
Course
Course
5
Week 4 tests.docx.do...
Week_4_tests.docx.docx
Course
Course
23
Week 6 tests.docx.do...
Week_6_tests.docx.docx
Course
Course
106