1. Jack has a bright idea: When the length of a subarray in quicksort is less than a certain number, say, 50 elements, run an insertion sort to process that subarray. Explain why this is a bright idea.
2. Describe the strategy of quicksort and explain why it can reduce the time complexity of sorting from O(n2) to O(n log n).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here