1
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
A function f defined on stacks of integers satisfies the following properties. f(∅) = 0 and f (push (S, i)) = max (f(S), 0) + i for all stacks S and integers i. If a stack S contains the integers 2, -3, 2, -1, 2 in order from bottom to top, what is f(S)?
A
6
B
4
C
3
D
2
2
GATE CSE 2004
MCQ (Single Correct Answer)
+1
-0.3
The best data structure to check whether an arithmetic expression has balanced parentheses is a
A
queue
B
stack
C
tree
D
list
3
GATE CSE 1997
MCQ (Single Correct Answer)
+1
-0.3
Which of the following is essential for converting an infix expression to the postfix form efficiently?
A
An operator stack
B
An operand stack
C
An operand stack and an operator stack
D
A parse tree
4
GATE CSE 1996
MCQ (Single Correct Answer)
+1
-0.3
Consider the following statements:
(i) First-in-first out types of computations are efficiently supported by STACKS.
(ii) Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations.
(iii) Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two indices.
(iv) Last-in-first-out type of computations are efficiently supported by QUEUES.
A
(ii) and (iii) are true
B
(i) and (ii) are true
C
(iii) and (iv) are true
D
(ii) and (iv) are true
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