retagged by
845 views
2 votes
2 votes

The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are

  1. $\Theta(n \log n),\Theta(n \log n) \text{ and } \Theta(n^2)$
  2. $\Theta(n^2),\Theta(n^2)\text{ and } \Theta(n \log n)$
  3. $\Theta(n^2), \Theta(n \log n)\text{ and } \Theta(n \log n)$
  4. $\Theta(n^2),\Theta(n\log n) \text{ and } \Theta(n^2)$
retagged by

1 Answer

0 votes
0 votes
Option D) is correct,

Worst case running time of Insertion Sort is O(n^2)

Worst case running time of Merge Sort is O(nlogn)

Worst case running time of Quick Sort is O(n^2)
Answer:

Related questions

0 votes
0 votes
3 answers
1
admin asked Mar 30, 2020
6,263 views
Which of the following standard algorithms is not Dynamic Programming based?Bellman-Ford Algorithm for single source shortest pathFloyd Warshall Algorithm for all pairs s...
0 votes
0 votes
2 answers
3
admin asked Mar 30, 2020
1,533 views
Let $G$ be a graph with $n$ vertices and $m$ edges.What is the tightest upper bound on the running time of Depth First Search of $G$, when $G$ is represented using adjace...
1 votes
1 votes
1 answer
4
admin asked Mar 30, 2020
903 views
Suppose $T(n)=2T(n/2)+n$, $T(0)=T(1)=1$ which one of the following is false?$T(n)=O(n^2)$$T(n)=\Theta(n\log n)$$T(n)=\Omega(n^2)$$T(n)=O(n\log n)$