3398. Smallest Substring With Identical Characters I
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], i.e., 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.