Bubbles larges element to end of array for each iteration Total shit algorithm. Every single other algorithm is better than this, for any use case.

Evaluation

Best CaseAverage CaseWorst CaseStableAdaptiveIn-place
Bubble SortYesYesYes

Pseudocode

stopIndex := array.length - 1
while stopIndex not zero {
	i := 0
	lastSwappedIndex
	while i < stopIndex {
		if array[i] > array[i + 1]
			swap elements at i, i + 1
			lastSwappedIndex := i
		i++
	}
	stopIndex := lastSwappedIndex
}

See Also

Sorting Algorithms