count time of quicksort and selectionsort