SORTING ALGORITHM: BUBBLE SORT
Bubble Sort
This is probably the simplest way sort an array of objects. Not to ignore the fact that it is also the slowest way!
The goal is to compare two neighboring objects.
Step1:Swap them if they are in the wrong order.
Given an array a of numbers, with length n, here’s a snippet of C code for bubble […]