1
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Postorder traversal of a given binary search tree T produces the following sequence of keys
10, 9, 23, 22, 27, 25, 15, 50, 95, 60, 40, 29
Which one of the following sequences of keys can be the result of an inorder traversal of the tree T?
2
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
The numbers 1, 2, ........, n are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains p nodes. The first number to be inserted in the tree must be
3
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing the integers 1,2,3,4,5,6,7 in the given order. What will be the contents of the list after the function completes execution?
struct node {
int value;
struct node *next;
};
Void rearrange (struct node *list ){
struct node *p, * q;
int temp;
if( !list || !list-> next) return;
p = list; q = list->next;
while (q) {
temp = p->value;
p-> value = q ->value;
q-> value = temp;
p = q-> next;
q = p ? p->next : 0;
}
}
4
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)?
Paper analysis
Total Questions
Algorithms
8
Compiler Design
6
Computer Networks
8
Computer Organization
11
Data Structures
11
Database Management System
14
Discrete Mathematics
26
Operating Systems
5
Programming Languages
6
Theory of Computation
6
More papers of GATE CSE
GATE CSE 2024 Set 2
GATE CSE 2024 Set 1
GATE CSE 2023
GATE CSE 2022
GATE CSE 2021 Set 2
GATE CSE 2021 Set 1
GATE CSE 2020
GATE CSE 2019
GATE CSE 2018
GATE CSE 2017 Set 1
GATE CSE 2017 Set 2
GATE CSE 2016 Set 1
GATE CSE 2016 Set 2
GATE CSE 2015 Set 1
GATE CSE 2015 Set 3
GATE CSE 2015 Set 2
GATE CSE 2014 Set 3
GATE CSE 2014 Set 2
GATE CSE 2014 Set 1
GATE CSE 2013
GATE CSE 2012
GATE CSE 2011
GATE CSE 2010
GATE CSE 2009
GATE CSE 2008
GATE CSE 2007
GATE CSE 2006
GATE CSE 2005
GATE CSE 2004
GATE CSE 2003
GATE CSE 2002
GATE CSE 2001
GATE CSE 2000
GATE CSE 1999
GATE CSE 1998
GATE CSE 1997
GATE CSE 1996
GATE CSE 1995
GATE CSE 1994
GATE CSE 1993
GATE CSE 1992
GATE CSE 1991
GATE CSE 1990
GATE CSE 1989
GATE CSE 1988
GATE CSE 1987
GATE CSE
Papers
2023
2022
2020
2019
2018
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987