1
GATE CSE 2021 Set 1
Numerical
+2
-0.67

Consider the following sequence of operations on an empty stack.

push(54); push(52); pop(); push(55); push(62); s = pop();

Consider the following sequence of operations on an empty queue.

enqueue(21); enqueue(24); dequeue(); enqueue(28); enqueue(32); q = dequeue();

The value of s + q is ______

Your input ____
2
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67

Consider a dynamic hashing approach for 4-bit integer keys:

1. There is a main hash table of size 4.

2. The 2 least significant bits of a key is used to index into the main hash table.

3. Initially, the main hash table entries are empty.

4. Thereafter, when more keys are hashed into it, to resolve collisions, the set of all keys corresponding to a main hash table entry is organized as a binary tree that grows on demand.

5. First, the 3rd least significant bit is used to divide the keys into left and right subtrees.

6. to resolve more collisions, each node of the binary tree is further sub-divided into left and right subtrees based on 4th least significant bit.

7. A split is done only if it is needed, i. e. only when there is a collision.

Consider the following state of the hash table.

GATE CSE 2021 Set 1 Data Structures - Hashing Question 3 English Which of the following sequence of key insertions can cause the above state of the hash table (assume the keys are in decimal notation)?

A
10, 9, 6, 7, 5, 13
B
5, 9, 4, 13, 10, 7
C
9, 5, 13, 6, 10, 14
D
9, 5, 10, 6, 7, 1
3
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67
Let P be an array containing n integers. Let t be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary of n elements. Which one of the following choices is correct?
A
t > 2n - 2
B
$$t > 3\left\lceil {\frac{n}{2}} \right\rceil $$ and t ≤ 2n - 2
C
t > n and $$t \le 3\left\lceil {\frac{n}{2}} \right\rceil $$
D
$$t > \left\lceil {{{\log }_2}(n)} \right\rceil $$ and t ≤ n
4
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67
A binary search tree T contains n distinct elements. What is the time complexity of picking an element in T that is smaller than the maximum element in T?
A
Θ(1)
B
Θ(n log n)
C
Θ(log n)
D
Θ(n)
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12