Bubble SortBubble sort, inversions, sentinel optimization, and bidirectional (cocktail) bubble sort with traces and measurements.