Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

dy dx Find the derivative of the function y=(4x+3)5(2x+1)2.

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago