Created quicksort algorithm