What is the main disadvantage of the bubble sort algorithm?

  • Cannot handle duplicate elements
  • High space complexity
  • Inefficient for large lists
  • Not stable
The main disadvantage of the bubble sort algorithm is its inefficiency for large lists, as it has a worst-case time complexity of O(n^2), making it impractical for sorting large datasets.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *