Imagine a stack with a new operation: PopMany which takes a parameter, ii, that specifies how many elements to pop from the stack. The cost of this operation is ii, the number of elements that need to be popped. Without this new operation, the amortized cost of any operation in a sequence of stack operations (Push, Pop, Top) is O(1)O(1) since the true cost of each operation is O(1)O(1). What is the amortized cost of any operation in a sequence of nn stack operations (starting with an empty stack) that includes PopMany (choose the best answers)? 1 point
Answers
Answered by
0
Look at your textbook and you can answer...okay
Similar questions