You are given a nums of length n, and an integer k.
The i with radius k is the average of all elements in nums spanning from index i - k to i + k inclusive. If there are fewer than k elements before or after index i, then the
Return an array avgs of length n where avgs[i] is the i.
Note: The average of
elements is the sum of the elements divided by , using integer division which rounds down to the nearest integer.
Constraints:
n == nums.length
n
nums[i], k
You are given a nums of length n, and an integer k.
The i with radius k is the average of all elements in nums spanning from index i - k to i + k inclusive. If there are fewer than k elements before or after index i, then the
Return an array avgs of length n where avgs[i] is the i.
Note: The average of
elements is the sum of the elements divided by , using integer division which rounds down to the nearest integer.
Constraints:
n == nums.length
n
nums[i], k