1
GATE CSE 2009
MCQ (Single Correct Answer)
+2
-0.6
Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap?
A
$$\left\{25,12,16,13,10,8,14\right\}$$
B
$$\left\{25,14,13,16,10,8,12\right\}$$
C
$$\left\{25,14,16,13,10,8,12\right\}$$
D
$$\left\{25,14,12,13,10,8,16\right\}$$
2
GATE CSE 2009
MCQ (Single Correct Answer)
+1
-0.3
What is the number of swaps required to sort n elements using selection sort, in the worst case?
A
$$\Theta(n)$$
B
$$\Theta(n \log n)$$
C
$$\Theta(n^2)$$
D
$$\Theta(n^2 \log n)$$
3
GATE CSE 2009
MCQ (Single Correct Answer)
+1
-0.3
Which of the following statement(s) is / are correct regarding Bellman-Ford shortest path algorithm?
P: Always finds a negative weighted cycle, if one exist s.
Q: Finds whether any negative weighted cycle is reachable from the source.
A
P Only
B
Q Only
C
Both P and Q
D
Neither P nor Q
4
GATE CSE 2009
MCQ (Single Correct Answer)
+2
-0.6
The running time of an algorithm is represented by the following recurrence relation:
$$T(n) = \begin{cases} n & n \leq 3 \\ T(\frac{n}{3})+cn & \text{ otherwise } \end{cases}$$
Which one of the following represents the time complexity of the algorithm?
A
$$\Theta(n)$$
B
$$\Theta(n \log n)$$
C
$$\Theta(n^2)$$
D
$$\Theta(n^2 \log n)$$
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12