← ALL NOTES
String

3441. Minimum Cost Good Caption

A string is "good" if every character repeats consecutively at least 3 times (segments of length ≥3). Turn s into a good string at minimum cost (cost = sum of |letter changes|); on ties, the…

Loading…