Mergesort and bubblesort