merge, quick and heap sort