quick sort using random or non-random partition method