1
GATE CSE 2011
+1
-0.3
A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?
A
B
C
D
2
GATE CSE 2011
+2
-0.6
We are given a set of n distinct elements and an unlabeled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?
A
0
B
1
C
n!
D
(1/n+1) * 2nCn
3
GATE CSE 2011
+1
-0.3
Consider a relation table with a single record for each registered student with a single record for each registered student with the following attributes.
$$1.$$ $$Registration$$ $$Num:$$ Unique registration number of each registered student.
$$2.$$ $$UID :$$ Unique identity number, unique at the national level for each cityzen.
$$3.$$ $$BankAccount_Num:$$ Unique account number at the bank. A student can have multiple accounts or joint accounts. This attribute stores the primary account number.
$$4.$$ $$Name:$$ Name of the student
$$5.$$ $$Hostel$$ $$Room:$$ Room number of the hostel.

Which of the following options is INCORRECT?

A
$$BankAccount$$ $$Num$$ is candidate key
B
$$Registration$$ $$Num$$ can be a primary key
C
$$UID$$ is a candidate key if all students are from the same country
D
If $$S$$ is a superkey such that $$S \cap UID$$ is NULL then $$S \cup UID$$ is also a superkey
4
GATE CSE 2011
+2
-0.6

Database table by name Loan_Records is given below.

Borrower Bank_Manager Loan_Amount
Ramesh Sunderajan 10000.00
Suresh Ramgopal 5000.00
Mahesh Sunderajan 7000.00

What is the output of the following SQL query?

SELECT count(*)
FROM (
(SELECT Borrower. Bank_Manager FROM Loan_Records) AS S
NATURAL JOIN
(SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T );
A
3
B
9
C
5
D
6
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
EXAM MAP
Medical
NEET