← 返回 meta 的题目列表Sliding Window Average and Maximum of Subarrays of Size K
类型:online_judge
meta
Given an integer array nums and an integer k, find the average and maximum of every contiguous subarray of size k. Aim for the lowest possible time complexity.
Example
Input
8 3
1 3 -1 -3 5 3 6 7