The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+3 votes

Consider the following sorting algorithms.

  1. Quicksort
  2. Heapsort
  3. Mergesort

Which of them perform in least time in the worst case?

  1. I and II only
  2. II and III only
  3. III only
  4. I, II and III
in Algorithms by Veteran (100k points) | 1.6k views

2 Answers

+9 votes
Best answer

Worst time complexity of Quicksort = O(n2)

Worst time complexity of Heapsort = O(nLogn)

Worst time complexity of Mergesort =O(nLogn)

Hence,Option(B) II and III .

by Boss (40.8k points)
selected by
+6 votes

Answer : B 

Heap Sort and Merge Sort


by Boss (45.1k points)
edited by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,092 questions
55,265 answers
86,083 users