STACK LIFE GATE Question

Published: 07 July 2020
on channel: Turning Point By Saklecha Sir (GATE CSE)
3,890
166

Let S be a stack of size n ≥ 1. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform n pop operations. Assume that Push and pop operation take X seconds each, and Y seconds elapse between the end of one such stack operation and the start of the next operation. For m ≥ 1, define the stack-life of m as the time elapsed from the end of Push(m) to the start of the pop operation that removes m from S. The average stack-life of an element of this stack is
(A) n (X + Y)
(B) 3Y + 2X
(C) n (X + Y) – X
(D) Y + 2X


On this page of the site you can watch the video online STACK LIFE GATE Question with a duration of hours minute second in good quality, which was uploaded by the user Turning Point By Saklecha Sir (GATE CSE) 07 July 2020, share the link with friends and acquaintances, this video has already been watched 3,890 times on youtube and it was liked by 166 viewers. Enjoy your viewing!