Problem 696 · Easy

Count Binary Substrings

Count substrings that contain equal numbers of zeros and ones, grouped in consecutive blocks. The visual shows runs of identical bits and how neighbouring runs pair up.

Open the interactive visualisation