BubbleSorter with strategy and template