You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Bubble sort is one of the simplest sorting algorithms. It works by repeatedly stepping through the list, comparing adjacent (neighbouring) pairs of elements, and swapping them if they are in the wrong order. This process is repeated until the list is sorted.
The name "bubble sort" comes from the way the largest values "bubble up" to the end of the list with each pass.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.