NeetCode #236LC-1888MediumSliding Window
← Back to All Problems#236 · #1888 · Minimum Number of Flips to Make the Binary String Alternating(使二进制字符串字符交替的最少反转次数)
📌 Problem Statement & Constraints
You are given a binary string
s. In one step you may either remove the first character and append it to the end, or flip any character. Return the minimum number of flips to make the string alternating. Constraints: 1 <= s.length <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!