GATE 2004 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2004

199 questions

MCQ 1991-mark 199

Questions 111–115 of 199

Q111Heap Tree1 markMCQ−0.33 if wrong
The elements 32, 15, 20, 30, 12, 25, 16, are inserted one by one in the given order into a MaxHeap. The resultant MaxHeap is
32 30 25 15 12 20 16 (a) 32 25 30 12 15 20 16 (b) 32 30 25 15 12 16 20 (c) 32 25 30 12 15 16 20 (d)

Q112Hashing1 markMCQ−0.33 if wrong
Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true?
i) 9679, 1989, 4199 hash to the same value
ii) 1471, 6171 has to the same value
iii) All elements hash to the same value
iv) Each element hashes to a different value

Q113Sorting1 markMCQ−0.33 if wrong
The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of

Q114Asymptotic Notation1 markMCQ−0.33 if wrong
Let f(n), g(n) and h(n) be functions defined for positive integers such that
f(n)=O(g(n)),  g(n)≠O(f(n)),  g(n)=O(h(n)), and h(n)=O(g(n)).f(n) = O(g(n)), \; g(n) \neq O(f(n)), \; g(n) = O(h(n)), \text{ and } h(n) = O(g(n)).
Which one of the following statements is FALSE?

Q115Asymptotic Notation1 markMCQ−0.33 if wrong
The time complexity of the following C function is (assume n >\gt 0)
int recursive (int n) {
   if (n == 1)
      return (1);
   else
      return (recursive (n - 1) + recursive (n - 1));
}