What is the best complexity of bubble sort?



What is the best complexity of bubble sort?..

Answer / Mrs Madhu

The best case time complexity of Bubble Sort is O(n) when the input array is already sorted or nearly sorted. However, in worst and average cases, its complexity is O(n^2), making it less efficient compared to other sorting algorithms like QuickSort or MergeSort.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

How is bubble sort done?

1 Answers  


Does list maintain insertion order?

1 Answers  


Write the algorithm for converting infix expression to postfix expression?

1 Answers  


What is example of data?

1 Answers  


What is sorting problem?

1 Answers  


Can treemap key null?

1 Answers  


Define non linear data structure.

1 Answers  


Tell me the difference between the character array and a string.

1 Answers   Honeywell, HPCL, Huawei, Zomato,


List the data structures which are used in hierarchical data model.

1 Answers  


what is AVL tree?

5 Answers   ADS, TCS,


Discuss how to implement queue using stack.

1 Answers  


Can treeset contain null?

1 Answers  


Categories