Fix of bubblesort, quicksort and mergesort