NeetCode #255LC-239HardSliding WindowNC 150NC 250
← Back to All Problems

#255 · #239 · Sliding Window Maximum(滑动窗口最大值)

📌 Problem Statement & Constraints

You are given an array nums and a window size k. A sliding window of size k moves from the left to the right of the array. Return an array of the maximum value in each window. Constraints: 1 <= nums.length <= 10^5, -10^4 <= nums[i] <= 10^4, 1 <= k <= nums.length.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!