Problem 3456 · Easy

Find Special Substring of Length K

Look for a block of exactly k equal letters whose neighbors, when present, are different letters.

Open the interactive visualisation