Leetcode 2914. Minimum Number of Changes to Make Binary String Beautiful
Given an even-length binary string, compute the minimum number of bit flips needed so the string can be partitioned into one or more even-length substrings that are each all 0s or all 1s — equivalently, make every maximal run of identical bits have even length. This requires optimizing flips across the string (typically via greedy/DP) to enforce even run lengths with minimal changes.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.