Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1888. Minimum Number of Flips to Make the Binary String Alternating
Given a binary string where you can perform any number of cyclic rotations for free and flip individual bits at cost 1, find the minimum flips needed to make the string alternating (no equal adjacent bits). The core challenge is to compare s under all rotations against the two alternating patterns ("0101..." and "1010...") and minimize mismatches efficiently (n up to 1e5).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.