← Amazon questions

Sliding Window Maximum

Filed under Amazon · Also reported at Accenture, Brane Enterprises, Cohesity, Expedia, Goldman Sachs, Harness, Hevo Data, Infosys and 9 more

Given an array of integers and an integer k representing the size of a sliding window, find the maximum element in each window of size k moving from left to right.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.