Bubble sort
The Bubble Sort Algorithm in Python
• Bubble Sort is one of the most straightforward sorting algorithms. Its
name comes from the way the algorithm works: With every new pass,
the largest element in the list “bubbles up” toward its correct
position.
• Bubble sort consists of making multiple passes through a list,
comparing elements one by one, and swapping adjacent items that
are out of order.

Bubble Sort is one of the most straightforward sorting algorithms

  • 1.
  • 3.
    The Bubble SortAlgorithm in Python • Bubble Sort is one of the most straightforward sorting algorithms. Its name comes from the way the algorithm works: With every new pass, the largest element in the list “bubbles up” toward its correct position. • Bubble sort consists of making multiple passes through a list, comparing elements one by one, and swapping adjacent items that are out of order.