</>OfferRetriever
DashboardDiscuss
NEW

Halloween Sale

Unlock all premium questions for over 30% off

$10.42$7.08/mo

--

:

--

:

--

:

--

Get this deal
Back to Google Questions

Count Distinct Elements in Each Window

Easy

Question

Slide a window of fixed length k over the integer array nums, one position at a time. At each position the window covers a contiguous subarray; record how many unique values sit inside it. Return the recorded numbers in window order, left to right. ...

Asked at:GoogleMetaMicrosoft

More Google interview questions

All Google interview questions
OfferRetriever

Master technical interviews with real questions from top companies. Build your confidence and career.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCodeCompare
LEGAL

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.