这是因为我们每一次交换都需要把区间内的一个 0 与区间外的 0 进行交换。 应为 这是因为我们每一次交换都需要把区间内的一个 0 与区间外的 1 进行交换。 0与0交换无实义,必须与1交换,才能达到所有1连续聚在一起的情况。
官方题解的小错误 - 1297. 子串的最大出现次数 · Issue #33361 · LeetCode-Feedback/LeetCode-Feedback · GitHub LeetCode-Feedback / LeetCode-Feedback Public Notifications You must be signed in to change notification ...
一些您可能无法访问的结果已被隐去。
显示无法访问的结果