isMatch
that takes the current index of s
, the current index of pattern
, the current mapping, and a set of already mapped strings.s
are fully matched, return true.s
is exhausted, return false.s
starts with the mapped string at the current index. If it does, continue with the next characters.s
that starts at the current index and has not been mapped to another character.isMatch
to continue with the next characters.