#3859
Count Subarrays With K Distinct Integers
grandmaster · 2240 · lc hard +32 · 17.9% accepted · 63 likes · top 1%
Description
Given an integer array nums and two integers k and m, count the subarrays that contain exactly k distinct integers and in which every distinct integer appears at least m times. Return that count.
Code
1
2
3