Question: Could use some help with these. 1) What is the worst case running time for a selection sort? A) O(1) B) O(log10 N) C) O(log2

Could use some help with these.

1) What is the worst case running time for a selection sort?

A) O(1)

B) O(log10 N)

C) O(log2 N)

D) O(log2 N)

E) O(N)

F) O(N log N)

H) O(N2)

I) O(N3)

J) O(Nk)

K) O(2N)

L) O(N!)

2)Examine the steps of the following algorithm and write the name of the algorithm described in the blank provided:

Recursively divide an array into two equal halves. Once the array can no longer be subdivided, put the halves back together; while doing so, sort the halves into a temporary array. Copy the temporary array back into the original array.

insertion sort

selection sort

shell sort

merge sort

quicksort

radix sort

3) A stable sort ensures that duplicate items are in the same positions relative to each other after sorting as they were before sorting.

True

False

4) What is the average running time for quicksort?

A) O(1)

B) O(log10 N)

C) O(log2 N)

D) O(log2 N)

E) O(N)

F) O(N log N)

O(N2)

O(N3)

O(Nk)

O(2N)

O(N!)

5) What is the worst case running time for quicksort?

A) O(N)

B) O(NlogN)

C) O(logN)

D) O(N2)

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!