1
GATE CSE 2010
MCQ (Single Correct Answer)
+2
-0.6
The following C function takes a simply-linked list as input argument. It modifies the list by moving the last element to the front of the list and returns the modified list. Some part of the code is left blank.
typedef struct node {
int value;
struct node *next;
} Node;
Node *move_to_front(Node *head) {
Node *p, *q;
if ((head = = NULL: || (head->next = = NULL)) return head;
q = NULL; p = head;
while (p-> next !=NULL) {
q=P;
p=p->next;
}
return head;
}
Choose the correct alternative to replace the blank line. 2
GATE CSE 2010
MCQ (Single Correct Answer)
+2
-0.6
Consider a complete undirected graph with vertex set {0,1,2,3,4}. Entry Wij in the matrix W below is the weight of the edge {i, j}
$$$W = \left( {\matrix{
0 & 1 & 8 & 1 & 4 \cr
1 & 0 & {12} & 4 & 9 \cr
8 & {12} & 0 & 7 & 3 \cr
1 & 4 & 7 & 0 & 2 \cr
4 & 9 & 3 & 2 & 0 \cr
} } \right)$$$
What is the minimum possible weight of a spanning tree T in this graph such that vertex 0 is a leaf node in the tree T?
3
GATE CSE 2010
MCQ (Single Correct Answer)
+2
-0.6
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below
How many different insertion sequences of the key values using the same hash function and linear probing will result in the hash table shown above?
How many different insertion sequences of the key values using the same hash function and linear probing will result in the hash table shown above?4
GATE CSE 2010
MCQ (Single Correct Answer)
+1
-0.3
A relational schema for a train reservation database is given below:
Passenger ( pid, pname, age)
Reservation (pid, cass, tid)
Table: Passenger
| pid | pname | age |
|---|---|---|
| 0 | 'Sachin' | 65 |
| 1 | 'Rahul' | 66 |
| 2 | 'Sourav' | 67 |
| 3 | 'Anil' | 69 |
Table: Reservation
| pid | class | tid |
|---|---|---|
| 0 | 'AC' | 8200 |
| 1 | 'AC' | 8201 |
| 2 | 'SC' | 8201 |
| 5 | 'AC' | 8203 |
| 1 | 'SC' | 8204 |
| 3 | 'AC' | 8202 |
What pids are returned by the following SQL query for the above instance of the tables?
SELECT pid
FROM Reservation
WHERE class 'AC' AND
EXISTS (SELECT *
FROM Passenger
WHERE age > 65
AND Passenger.pid = Reservation.pid);
Paper Analysis
Total Questions
Algorithms 3
Compiler Design 4
Computer Networks 5
Computer Organization 4
Data Structures 5
Database Management System 5
Digital Logic 4
Discrete Mathematics 10
Operating Systems 5
Programming Languages 2
Software Engineering 3
Theory of Computation 4
More Papers of GATE CSE
GATE CSE 2026 Set 2 GATE CSE 2026 Set 1 GATE CSE 2025 Set 2 GATE CSE 2025 Set 1 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 2 GATE CSE 2017 Set 1 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 2 GATE CSE 2014 Set 1 GATE CSE 2014 Set 3 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
All year-wise previous year question 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