1
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
An implementation of a queue Q, using two stacks S1 and S2, is given below:
void insert(Q, X){
push(S1, X);
}
void delete(Q){
if(stack - empty(S1)) then {
print("Q is empty");
return;
}else while (!(stack - empty(S1))){
X = pop(S1);
push(S2, X);
}
X = pop(S2);
}
Let n insert and $$m( \le n)$$ delete operations be performed in an arbitrary order on an empty queue Q. Let x and y be the number of push and pop operations performed respectively in the process. Which one of the following is true for all m and n?2
GATE CSE 2006
MCQ (Single Correct Answer)
+1
-0.3
Which of the following relational query languages have the same expressive power?
I) Relational algebra
II) Tuple relational calculus restricted to safe expressions
III) Domain relational calculus restricted to safe expressions
3
GATE CSE 2006
MCQ (Single Correct Answer)
+1
-0.3
Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1 contains 2000 tuples and r2 contains 2500 tuples. The maximum size of the join $${r_1} \Join {r_2}$$ is
4
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are Did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing is available in the database.
D: Drivers Relation
Did | Dname | rating | Age |
---|---|---|---|
22 | Karthikeyan | 7 | 25 |
29 | Salman | 1 | 33 |
31 | Boris | 8 | 55 |
32 | Amoldt | 8 | 25 |
58 | Schumacher | 10 | 35 |
64 | Sachin | 7 | 35 |
71 | Senna | 10 | 16 |
74 | Sachin | 9 | 35 |
85 | Rahul | 3 | 25 |
95 | Ralph | 3 | 53 |
R: Reserves Relation
Did | cid | Day |
---|---|---|
22 | 101 | 10/10/06 |
22 | 102 | 10/10/06 |
22 | 103 | 8/10/06 |
22 | 104 | 7/10/06 |
31 | 102 | 10/11/06 |
31 | 103 | 6/11/06 |
31 | 104 | 12/11/06 |
64 | 101 | 5/9/06 |
64 | 102 | 8/9/06 |
74 | 103 | 8/9/06 |
C: Cars relation
cid | Cname | Color |
---|---|---|
101 | Renault |
Blue |
102 | Renault |
Red |
103 | Ferrari | Green |
104 | Jaguar | Red |
What is the output of the following SQL query?
Select D.dname
From Drivers D
Where D.did in (SELECT R.did
From Cars C,Reserves R
WHERE R.cid = C.cid and C.color = 'green')
Paper analysis
Total Questions
Algorithms
14
Compiler Design
6
Computer Networks
6
Computer Organization
9
Data Structures
12
Database Management System
8
Digital Logic
4
Discrete Mathematics
25
Operating Systems
8
Programming Languages
1
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