Problem 2107 · Medium

Number of Unique Flavors After Sharing K Candies

Keep the most distinct flavors after giving away one contiguous block of k candies.

Open the interactive visualisation