Problem 2523 · Medium

Closest Prime Numbers in Range

Walk the primes in the range in order and keep the adjacent pair with the smallest gap.

Open the interactive visualisation