Max of Min for Every Window

Given an integer array arr, find the maximum of the minimum for every window size in the array. A window of size k consists of k consecutive elements.

For each window size from 1 to n, find the minimum element in that window, then return the maximum of all those minimums.

Examples
Input: [10,20,30,50,10,70,30]
Output: [70,30,20,10,10,10,10]
Hints

Max of Min for Every Window

Given an integer array `arr`, find the maximum of the minimum for every window size in the array. A window of size k consists of k consecutive elements.