Description
DAT/305 Week 3 Challenge Activities 3.1.1: Stack ADT
CHALLENGE ACTIVITY 1
Given numStack: 69,87 (top is 69)
What is the stack after the following operations?
Pop(numStack)
Push(numStack, 92)
Pop(numStack)
Push(numStack, 77)
After the above operations, what does GetLength(numStack) return?
CHALLENGE ACTIVITY 2
Given numStack: 11,71,12 top is 11)
What does Peek(numStack) return?
What is the stack after the following operations?
Push(numStack, 34)
Pop(numStack)
Push(numStack, 73)
Peek numStack)
Peek/numStack)
After the above operations, what does GetLength(numStack) return?
CHALLENGE ACTIVITY 3
Given numStack: 16.65 (top is 16)
Pop(numStack)
Pop(numStack)
After the above operations, what does GetLength(numStack) return?
After the above operations, what does isEmpty(numStack) return?
Reviews
There are no reviews yet.