added solutions for mergesort and quicksort