You are given a binary string s and an integer numOps.
You are allowed to perform at most numOps operations on s. In a single operation, you can choose any index in s and flip the character at that position (changing '0' to '1' or '1' to '0').
Return the minimum possible length of the longest substring consisting of identical characters that can be achieved after at most numOps operations.
Constraints:
n s.length
s consists only of '0' and '1'.
numOps n
You are given a binary string s and an integer numOps.
You are allowed to perform at most numOps operations on s. In a single operation, you can choose any index in s and flip the character at that position (changing '0' to '1' or '1' to '0').
Return the minimum possible length of the longest substring consisting of identical characters that can be achieved after at most numOps operations.
Constraints:
n s.length
s consists only of '0' and '1'.
numOps n