Longest Subarray With at Most K Distinct Prime Factors
Slide a window over the array and track how many windows primes are present, shrinking whenever more than k distinct primes appear.
Slide a window over the array and track how many windows primes are present, shrinking whenever more than k distinct primes appear.