Interviews2 answers
Advantages and Disadvantages of Bubble Sorting?
2 Answers
Kirtesh ShahPosted Oct 30, 2022, 9:04 AM EDT
Advantages:
Easy to understand.
Easy to implement.
In-place, no external memory is needed.
Performs greatly when the array is almost sorted.
Disadvantages
Very expensive, O(n2) in worst case and average case.
It does more element assignments than its counterpart, insertion sort.
Brahma Prakash ShuklaPosted Oct 29, 2022, 9:23 AM EDT

