โ† Amazon questions
CodingMedium

Distinct Elements in Window

Filed under Amazon

Given an array of integers and an integer m representing the size of a sliding window, find the number of distinct elements in every window of size m as it slides 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.