I have the following question on a homework assignment and I'm not sure how to approach it
Assume we have the following sorting algorithm:
To sort an array of size N(A[1…N]), the algorithm will do the following:
- Recursively, Sort the first N-1 elements A[1…N-1]
- Use binary search to find the correct place of A[N] to add it to the sorted list. After finding the correct place, it will need to shift the values to make place for A[N].
Write the detailed recurrence equation for this algorithm (do not omit any terms).