1963.使字符串平衡的最小交换次数:计数模拟(不需要麻烦的“三种写法一步步优化”)
【LetMeFly】1963.使字符串平衡的最小交换次数:计数模拟(不需要麻烦的“三种写法一步步优化”)力扣题目链接:https://leetcode.cn/problems/minimum-number-of-swaps-to-make-the-string-balanced/ 给你一个字符串 s ,下标从 0 开始 ,且长度为偶数 n 。字符串 恰好 由 n / 2 个开括号 '[' 和 n