1
GATE CSE 2016 Set 2
MCQ (Single Correct Answer)
+1
-0.3
Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following are TRUE?

$$\,\,\,\,\,\,\,{\rm I}.\,\,\,\,\,\,\,$$ Quicksort runs in $$\Theta \left( {{n^2}} \right)$$ time
$$\,\,\,\,\,{\rm I}{\rm I}.\,\,\,\,\,\,\,$$ Bubblesort runs in $$\Theta \left( {{n^2}} \right)$$ time
$$\,\,\,{\rm I}{\rm I}{\rm I}.\,\,\,\,\,\,\,$$ Mergesort runs in $$\Theta \left( n \right)$$ time
$$\,\,\,{\rm I}V.\,\,\,\,\,\,\,$$ Insertion sort runs in $$\Theta \left( n \right)$$ time

A
$${\rm I}$$ and $${\rm II}$$ only
B
$${\rm I}$$ and $${\rm III}$$ only
C
$${\rm II}$$ and $${\rm IV}$$ only
D
$${\rm I}$$ and $${\rm IV}$$ only
2
GATE CSE 2016 Set 1
MCQ (Single Correct Answer)
+1
-0.3
The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are:
A
$$\Theta \left( {n\,\log n} \right),\Theta \left( {n\,\log n} \right),\,\,$$ and $$\,\,\Theta \left( {{n^2}} \right)$$
B
$$\Theta \left( {{n^2}} \right),\Theta \left( {{n^2}} \right),\,\,$$ and $$\,\,\Theta \left( {n\,\log n} \right)$$
C
$$\Theta \left( {{n^2}} \right),\,\,\Theta \left( {n\,\log n} \right),\,\,$$ and $$\,\,\Theta \left( {n\,\log n} \right)$$
D
$$\Theta \left( {{n^2}} \right),\Theta \left( {n\,\log n} \right),\,\,$$ and $$\,\,\Theta \left( {{n^2}} \right)$$
3
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n ( $$\ge 2$$ ) numbers? In the recurrence equations given in the options below, c is a constant.
A
T(n) = 2T(n/2) + cn
B
T(n) = T(n - 1) + T(1) + cn
C
T(n) = 2T(n - 1) + cn
D
T(n) = T(n/2) + cn
4
GATE CSE 2015 Set 2
MCQ (Single Correct Answer)
+1
-0.3
An unordered list contains $$n$$ distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is
A
$$\Theta \left( {n\,\,\log \,\,n} \right)$$
B
$$\Theta \left( n \right)$$
C
$$\Theta \left( {\log \,\,n} \right)$$
D
$$\Theta \left( 1 \right)$$
GATE CSE Subjects
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
CBSE
Class 12