Searching Sorting and Hashing questions

Q13

GATE CS 2016 CS-1Searching Sorting and HashingMCQ1 mark−1/3 if wrong
The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are:
Show answer without attempting

Answer: D

Q13

GATE CS 2016 CS-2Searching Sorting and HashingMCQ1 mark−1/3 if wrong
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)\Theta(n^2) time
II. Bubblesort runs in Θ(n2)\Theta(n^2) time
III. Mergesort runs in Θ(n)\Theta(n) time
IV. Insertion sort runs in Θ(n)\Theta(n) time
Show answer without attempting

Answer: D

0/20 correct0 marks

Related topics in Algorithms