Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Could use some help with these. 1) What is the worst case running time for a sel

ID: 3756028 • Letter: C

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 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)

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)

Explanation / Answer

1.

O(n2) is the worst case running time for a selection sort.

Option H

2.

merge sort :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.

Option 4

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

4.

O(N log N)  is the average running time for quicksort.

Option F

5.

O(N2) is the worst case running time for quicksort.

Option D

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote