[mod] refactor quicksort with enum