View the step-by-step solution to:

# Write a recurrence relation that describes the running time of the following (not very smart) algorithm. The input is an array, A, and some constant...

Can anyone explain how you actually arrive with the following recurrence relation for this question?

I know for n<= k it's O(1) since it's just returning the array but how do you get the bottom part?

Write a recurrence relation that describes the running time of the following (not very smart) algorithm. The input is
an array, A, and some constant integer k. Assume a comparison based sort in Step 2. my_divide_and_conquer(A, k)
0. Let n be the number of elements in A
. If n &lt;= k, return A
. Sort A.
. Copy A[k..n-1] into a new array C
. Call my_divide_and_conquer(C, k) I-DUJMH 0(1) ifn g k T(n — k) + O(n log n) otherwise

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents