Question: Please answer both part a and b, then I will give you a like Let A[1n] be an array consisting of n distinct numbers. Develop
Please answer both part a and b, then I will give you a like
Let A[1n] be an array consisting of n distinct numbers. Develop a divide-and-conquer algorithm to find the largest number among the elements of A. (a) Write down the pseudo-code for your algorithm. (b) Define T(n) as the running time of your algorithm on an input of size n. Find a recursive formula for T(n), i.e., write T(n) in terms of T(k) for some 1k
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
