1
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
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 operations 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
2
GATE CSE 1998
Subjective
+2
-0
Compute the post fix equivalent of the following expression. 3 * log(x+1) - a/2
3
GATE CSE 1998
MCQ (Single Correct Answer)
+2
-0.6
What value would the following function return for the input x = 95?
 function fun (x:integer):integer; 
   Begin 
      If x > 100 then fun : x – 10 
      Else fun : fun(fun (x + 11)) 
   End; 
A
89
B
90
C
91
D
92
4
GATE CSE 1997
MCQ (Single Correct Answer)
+2
-0.6
A priority queue Q is used to implement a stack that stores characters. PUSH (C) is implemented INSERT (Q, C, K) where K is an appropriate integer key chosen by the implementation. POP is implemented as DELETEMIN(Q). For a sequence of operations, the keys chosen are in
A
non-increasing order
B
non-decreasing order
C
strictly increasing order
D
strictly decreasing order
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12