solulubeta
Sign in
Story Problems / Arrays, windows & two pointers
01.04 · Problem

Playlist With At Most K Genres

Medium Variable window with a frequency map Pro

This problem is part of solulu Pro

Meera's playlist is a list of songs, each labelled with a genre id. She wants to listen to a continuous part of it that contains at most k different genres so that her mood does not change too much. What is the maximum…

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 4 of 94 · updated 2026-10-12