Max Subarray (keteki)
CodeChefOpen on judge ↗
There is an array of length n. Print the minimum of all the maximum values of all the contiguous subarrays of the array of length k. Input Input starts with a number T (1Tn and k (1knOutput Print the values of each test case on a newline each. Sample cases: Input 2 5 2 5 8 2 1 9 3 3 1 2 3 Output 2 3 Explanation for first test case: from each index take a sub array of length 2: [5,8]
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start