0
9.6kviews
Sort the following numbers using Quick sort. Also derive the time complexity of quick sort. 50, 31, 71, 38, 77, 81, 12, 33
1 Answer
0
508views

We have set a pivot for the given numbers by which we can apply quick sort algorithm. enter image description here

Hence after applying the quick sort technique the sorted numbers are 12, 31, 33, 38, 50, 71, 77, 81.

Complexity of Quick Sort

  1. Worst-case: O(N2)

This happens when the pivot is the smallest …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.