Data Structure GATE previous year questions with answer
Ques 53 Gate 2016 Set-1
What will be the output of the following C program?
{
static int d = 1;
printf("%d ", n);
printf("%d ", d);
d++;
if(n > 1) count(n-1);
printf("%d ", d);
}
int main()
{
count(3);
}
Ques 54 Gate 2016 Set-1
Let G be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increased by the same value, then which of the following statements is/are TRUE?
Q: Shortest path between any pair of vertices does not change
Ques 55 Gate 2016 Set-1
A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT (n refers to the number of items in the queue)?
Ques 56 Gate 2015 Set-3
Given a hash table T with 25 slots that stores 2000 elements, the load factor α for T is __________
Ques 57 Gate 2015 Set-3
Assume that a mergesort algorithm in the worst case takes 30 seconds for an input of size 64. Which of the following most closely approximates the maximum input size of a problem that can be solved in 6 minutes?
Ques 58 Gate 2015 Set-3
Consider the following array of elements.
〈89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100〉.
The minimum number of interchanges needed to convert it into a max-heap is
Ques 59 Gate 2015 Set-3
While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is
Ques 60 Gate 2015 Set-3
The result evaluating the postfix expression 10 5 + 60 6 / * 8 – is
Ques 61 Gate 2015 Set-2
A binary tree T has 20 leaves. The number of nodes in T having two children is ________
Ques 62 Gate 2015 Set-2
Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is
Total Unique Visitors