3399. Smallest Substring With Identical Characters II
You are given a binary string
sof lengthnand an integernumOps.You are allowed to perform the following operation on
sat mostnumOpstimes:
- Select any index
i(where0 <= i < n) and flips[i]. Ifs[i] == '1', changes[i]to'0'and vice versa.You need to minimize the length of the longest substring of
ssuch that all the characters in the substring are identical.Return the minimum length after the operations.
A substring is a contiguous non-empty sequence of characters within a string.