Find All Good Strings
Count strings between s1 and s2 that avoid evil by tracking the KMP match length and whether the prefix still ties to either bound.
Count strings between s1 and s2 that avoid evil by tracking the KMP match length and whether the prefix still ties to either bound.