Modified FlagBubbleSort.