Problem 3589 · Medium

Count Prime-Gap Balanced Subarrays

Grow each subarray from a fixed start and track its smallest and largest prime, counting it when it has two primes within k.

Open the interactive visualisation