Problem 1915 · Medium

Number of Wonderful Substrings

Count substrings in which at most one letter from a to j appears an odd number of times. The visual tracks a ten-bit parity mask updated per character and a table of masks seen so far.

Open the interactive visualisation