Description
DAT/305 Week 3 Challenge Activities 3.2.1: Stacks using linked lists
CHALLENGE ACTIVITY 1
Given an empty stack numStack, what does the list head pointer point to? If the pointer is null, enter null.
After the following operation, which node does the list head pointer point to?
StackPush(numStack, 83)
CHALLENGE ACTIVITY 2
Given numStack: 54, 38, 25, 28 (top is 54)
After the following operation: StackPush(numStack, 40)
What node does newNode’s next pointer point to? If the pointer is null, enter null.
What node does the list’s head pointer point to?
CHALLENGE ACTIVITY 3
Given numStack: 51 (top is 51)
After the following operation: StackPop(numStack)
What is returned?
What node does the list’s head pointer point to? If the pointer is null, enter null:
Reviews
There are no reviews yet.