Given a string word containing only the letters "a", "b", and "c", return the minimum number of characters that must be inserted into word to make it valid.
A string is considered valid if it can be formed by concatenating the string "abc" one or more times.
Constraints:
word.length
word consists of letters "a", "b", and "c" only.
Given a string word containing only the letters "a", "b", and "c", return the minimum number of characters that must be inserted into word to make it valid.
A string is considered valid if it can be formed by concatenating the string "abc" one or more times.
Constraints:
word.length
word consists of letters "a", "b", and "c" only.