Company: jpmc_27july
Difficulty: medium
Maximum of Minimums Problem Description You are given an array arr of n positive integers and an integer k . Consider every block of k consecutive elements of the array. There are exactly n - k + 1 such blocks: the first starts at the first element, and the last one ends exactly at the last element of the array. No shorter block at the end of the array is considered. For each block, take the smallest element inside it. Among all of those smallest elements, report the largest one. Complete the maxMin function in the editor: int maxMin(vector<int> arr, int k) The function is expected to return an INTEGER : the maximum of the minima of all blocks of length k . Input Format The first line contains a single integer n , the number of elements in arr . Each of the next n lines contains a single integer arr[i] ( 0 <= i < n ), given in order. The last line contains a single integer k , the block length. Output Format Print a single integer on its own line: the maximum, over all bloc