Advertisements
Advertisements
Question
What are the best and worst time complexity for bubble sort?
Options
Best: O(n), worst(O(n2))
Best: O(n2), worst(O(n2))
Best: logn, worst(O(n))
Best: nlogn, logn
MCQ
Solution
Best: O(n), worst(O(n2))
shaalaa.com
Bubble Sort
Is there an error in this question or solution?