InterviewSolution
Saved Bookmarks
| 1. |
What is the worst case time complexity of strand sort?(a) O(n)(b) O(n log n)(c) O(n^2)(d) O(n^2 log n)The question was asked in an interview for job.My question is taken from Sorting topic in portion Sorting of Data Structures & Algorithms II |
|
Answer» CORRECT option is (C) O(n^2) EASY explanation - WORST CASE time complexity of strand sort is O(n^2). It occurs in the case where the input array is in reverse sorted order. |
|