You are given a string
sconsisting only of lowercase English letters.A prefix of
sis called a residue if the number of distinct characters in the prefix is equal tolen(prefix) % 3.Return the count of residue prefixes in
s.prefix
non-empty substring
1 | class Solution { |