2645. Minimum Additions to Make Valid String
Given a string
wordto which you can insert letters “a”, “b” or “c” anywhere and any number of times, return the minimum number of letters that must be inserted so thatwordbecomes valid.A string is called valid if it can be formed by concatenating the string “abc” several times.
1 | class Solution { |