Question: 1.The ideal situation in quick sort is when the pivot moves a. to a random place in the array b. To the end of the

1.The ideal situation in quick sort is when the pivot moves a. to a random place in the array b. To the end of the array c. to the beginning of the array d. to the center of the array 2. The class Arrays in the package java.util has several static methods to sort arrays of primitive types into ascending order. Which sort is used? a. merge sort b. insertion sort c. quick sort d. shell sort 3. "In quick sort, dividing the array portions before and after the pivot are called" a. recursive arrays b. halves c. partitions d. sections 4."In quick sort, the partition step takes at most ______ comparisons for n items." a. n^2 b. 2n c. n d. 1 5."In merge sort, the merge step takes at most ______ comparisons for n items." a. n b.2n c.n-1 d. n^2 6."In quick sort, having every partition form sub arrays of roughly the same size" a. creates more work because of repeated comparisons b. slows the processing down c. is optimal d. all of the above 7. Radix sort a. partitions the array b. merges the array back into place c. distributes digits into buckets 8."In merge sort, allocating and initializing an array many times during the recursive calls to merge" a. is the only way the merge process will work b. is the waste time and space c. is the only way to ensure the alagorithm will work currently d. all of the above 9."When quick sort partitions arrays as small as 10 entries, the best strategy is to" a. use merge sort on the small array b. use shell sort on the small array c. uses the quick sort down as small as two entries d. use insertion sort on the small array

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!