First page Back Continue Last page Overview Graphics
Bubble Sort
Input: an array of elements (e.g. integers)
Output: an array containing all the elements provided as input in sorted order
Steps
- take two adjacent elements at a time and compare them.
- repeat until no more swaps are possible.
Notes: