1758. Minimum Changes To Make Alternating Binary String Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 1758class Solution: def minOperations(self, s: str) -> int: cnt = sum(c != '01'[i & 1] for i, c in enumerate(s)) return min(cnt, len(s) - cnt)