GATEverse
← GATE CSE 2003

Q64

MCQ2 marks, −0.5

Let S be a stack of size n≥1n \geq1. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform nn pop operations. Assume that Push and Pop operations take XX seconds each, and YY seconds elapse between the end of one such stack operation and the start of the next operation. For m≥1m \geq1, define the stack-life of mm as the time elapsed from the end of Push(m)Push(m) to the start of the pop operation that removes mm from S. The average stack-life of an element of this stack is

Sign in to save attempts.

Loading…