← ALL NOTES
String

1888. Minimum Number of Flips to Make the Binary String Alternating

Binary string s. Type-1 op: move the first character to the end (a cyclic shift). Type-2 op: flip any character. Find the minimum number of type-2 flips to make s alternating, allowing any number of…

Loading…