Problem
Ask
Submissions

Problem: Maximum Average Subarray I

Easy
15 min
Understand how to apply the sliding window technique to efficiently find the maximum average of a contiguous subarray of length k. Learn to break down the problem, analyze constraints, and implement your solution with optimized time complexity.

Statement

Given an array of integers nums, and an integer k, return the maximum average of a contiguous subarray of length k.

Constraints:

  • 11 \leqk \leq nums.length \leq 10510^5

  • 104-10^4 \leqnums[i] 104\leq 10^4

Problem
Ask
Submissions

Problem: Maximum Average Subarray I

Easy
15 min
Understand how to apply the sliding window technique to efficiently find the maximum average of a contiguous subarray of length k. Learn to break down the problem, analyze constraints, and implement your solution with optimized time complexity.

Statement

Given an array of integers nums, and an integer k, return the maximum average of a contiguous subarray of length k.

Constraints:

  • 11 \leqk \leq nums.length \leq 10510^5

  • 104-10^4 \leqnums[i] 104\leq 10^4