Undefined slice

Report a typo

Suppose you are working with the myStack and myQueue variables:

myStack := Stack{storage: []int{1, 2, 3, 4}}
myQueue := Queue{Stack{storage: []int{1, 2, 3, 4}}, Stack{}}

Match each Pop and Push operation with the effect it will have on the myQueue and myStack variables below:

Match the items from left and right columns
myStack.Pop()
myQueue.Pop()
myStack.Push(7)
myQueue.Push(8)
[1 2 3 4 7]
1
4
[1 2 3 4 8]
___

Create a free account to access the full topic