Problem
I. (i) Write pseudocode for a divide-and-conquer algorithm for finding the position of the largest element in an array of n numbers.
(ii) What will be your algorithm's output for arrays with several elements of the largest value?
(iii) Set up and solve a recurrence relation for the number of key comparisons made by your algorithm.
(iv) How does this algorithm compare with the brute-force algorithm for this problem?
II. (i) Write pseudocode for a divide-and-conquer algorithm for finding values of both the largest and smallest elements in an array of n numbers.
(ii) Set up and solve (for n = 24) a recurrence relation for the number of key
comparisons made by your algorithm.
(iii) How does this algorithm compare with the brute-force algorithm for this problem?