BubbleSort is encapsulated into a library