Question: Please explain how you came up with your answer Write recurrence relation for the worst-case time complexity for each algorithm provided below. Solve the relation

Please explain how you came up with your answer
Write recurrence relation for the worst-case time complexity for each algorithm provided below. Solve the relation using the Master Theorem. Show your work a) The following inefficient algorithm takes as input a max heap A (arranged as an array), and an index of a root, and returns the minimum value in the heap (Note: in top level call r 1) maxHeapFindMin(A[1..n], r) if r> n then return INFINITY if maxHeapFindMin(A, 2*r maxHeapFindMin(A, 2*r+1) then return min(A[r],maxHeapFindMin(A, 2*r)) else return min(A[r],maxHeapFindMin(A, 2*r+1)) end if end maxHeapFindMin b) (Note: in top level call s 1 and t n) skewedFind(A[1. .n], s, t, k) if (s> t) return -1 m1 s floor((t - s 100) // Divide array into 3 chunks, with 1/100, m2 s floor (2* (t- s)/ 5) // 39/100, and 3/5 of the elements in A[s..t] for (i-s; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
