InterviewSolution
Saved Bookmarks
| 1. |
What is the average case complexity of QuickSort?(a) O(nlogn)(b) O(logn)(c) O(n)(d) O(n^2)This question was addressed to me during an interview.I need to ask this question from Quicksort in division Sorting of Data Structures & Algorithms II |
|
Answer» RIGHT answer is (a) O(nlogn) EASY explanation - The position of partition(split) is unknown, hence all(n) possibilities are CONSIDERED, the AVERAGE is found by adding all and DIVIDING by n. |
|