Bubble Sort, Bubble Sort Algorithm, Data Structure Algorithm, Dsa Courses, Naem Azam.
Bubble sort There is a better version of bubble sort, known as modified bubble sort which includes a flag in the inner loop. We initialize that flag with false. If a swap is made after an entire iteration of the outer loop then we set the flag to true otherwise keep it as it is. If the flag remains