The bubble sort gets its name because as array elements are sorted they gradually “bubble” to their proper positions, like bubbles rising in a glass of soda.
The bubble sort gets its name because as array elements are sorted they gradually “bubble” to their proper positions, like bubbles rising in a glass of soda.