Several-Coding-Patterns-for-Solving-Data-Structures-and-Algorithms-Problems-during-Interviews icon indicating copy to clipboard operation
Several-Coding-Patterns-for-Solving-Data-Structures-and-Algorithms-Problems-during-Interviews copied to clipboard

First Sliding window example and the question in leetcode does not correlate

Open jerrycaffe opened this issue 1 year ago • 0 comments

I discovered that while talking about the brute force solution i.e naive solution while explaining the sliding window patter, the leetcode example https://leetcode.com/problems/maximum-average-subarray-i/description/ is expected to return a single result of the maximum average, but the code example within the tutrorial returned the average of all k values.

jerrycaffe avatar May 14 '24 10:05 jerrycaffe