You are coding as a Guest. Sign in with Google in 1 tap to save your daily streak, lock in +50 XP & boost your college rank!
Save Streak (1-Tap Google)9:00 AM Daily Incident ReleaseMaintaining a 7-day streak grants a 2.5× Recruiter Visibility Multiplier on the Recruiter Talent Radar.
Multiplier Ladder:1d: 1.0ו3d: 1.5ו7d: 2.5× MAX
Talent Radar →Problem Set
🔥Sliding Window Maximum: Monotonic DequeHard
SUPER HARD PROBLEM OF THE DAY+150 XP • FAANG OA TIER
High-difficulty challenge matching authentic Google, Amazon & Uber L5 online assessment conditions.
HardSliding Window•Acceptance: 46.5%
Sliding Window Maximum: Monotonic Deque
Targeted in FAANG & Tech OA:GoogleAmazonSwiggy
Real-World Engineering Context
Used in High-Frequency Trading order book volatility monitors and streaming audio/video loudness peak meters at Spotify and Amazon.
You are given an array of integers `nums`, there is a sliding window of size `k` which is moving from the very left of the array to the very right. You can only see the `k` numbers in the window. Each time the sliding window moves right by one position.
Return the max sliding window array.
Sample Test Cases
Input: [[1,3,-1,-3,5,3,6,7],3]
Expected: [3,3,5,5,6,7]
Input: [[1],1]
Expected: [1]
Input: [[9,8,7,6,5],3]
Expected: [9,8,7]
Constraints
- 1 <= nums.length <= 10^5
- -10^4 <= nums[i] <= 10^4
- 1 <= k <= nums.length
Verified Proof-of-Work ATS PortfolioCryptographic Verification
Export tamper-proof problem verifications to your direct ATS applications
Every verified problem solve writes authentic cryptographic proof-of-work to your profile. Attach your verified DevScore badge to ATS applications to stand out to engineering hiring teams across 4,000+ verified live tech openings (23,000+ cumulative audited) on RoleNest.
Explore 4,000+ Direct ATS Openings on RoleNest ↗Solve Challenge to Activate Ledger
Language:
Ready to test. Click Run Code or Submit Solution to run test cases in isolated browser sandbox.