Algorithms | BubbleSort | Question 1

Last Updated :
Discuss
Comments

Assume that we use Bubble Sort to sort n distinct elements in ascending order. When does the best case of Bubble Sort occur?

When elements are sorted in ascending order

When elements are sorted in descending order

When elements are not sorted by any order

There is no best case for Bubble Sort. It always takes O(n*n) time

Share your thoughts in the comments