Description
use pseudocode to complete the following question
let ??[1: ??] be an array of real numbers, and ?? a fixed positive integer ? ??. An ??-subarray of ?? isany sequence of ?? consecutive elements of the array ??. The trough of an ??-subarray is theminimum value in that ??-subarray. Give a divide-and-conquer algorithm that takes as input anarray ??[1: ??] and a positive integer ?? ? ??, and returns the starting position of the ??-subarray thathas the largest trough. Analyze the time complexity of your algorithm in terms of ?? and ??. (Youralgorithm should split the input into two halves)