the solution by using the ordinary quick sort