Computer Sciences > Gate 2016 Set-2 > Complexity
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 ?
I. Quicksort runs in Θ(n2) time
II. Bubblesort runs in Θ(n2) time
III. Mergesort runs in Θ(n) time
IV. Insertion sort runs in Θ(n) time
I. Quicksort runs in Θ(n2) time
II. Bubblesort runs in Θ(n2) time
III. Mergesort runs in Θ(n) time
IV. Insertion sort runs in Θ(n) time
Correct : Complexity
Similar Questions
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 tre...
Which one of the following is the recurrence equation for the worst case time complexity of the
Quicksort algorithm for sorting n ( ≥ 2) numbers? In the recurr...
The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are:
Total Unique Visitors
Loading......