Subarrays with K Different Integers
Hard · Hashing · about 30 minutes
Asked at Amazon, Google, Microsoft, Roblox, Salesforce.
Return the number of contiguous subarrays of nums that contain exactly k different integers.
Hard · Hashing · about 30 minutes
Asked at Amazon, Google, Microsoft, Roblox, Salesforce.
Return the number of contiguous subarrays of nums that contain exactly k different integers.