Added quicksort and mergesort and a common Algorithm with util functions