leetcode.com











Problem Statement


Given an array nums and an integer k, return the maximum element for every sliding window of size k.







Brute Force Intuition


In an interview, you can explain it like this:


For every window of size k, iterate through all its elements and find the...