You are given a string s of length n containing only the characters 'Q', 'W', 'E', and 'R'.
A string is called balanced if each of these n
Return the minimum length of a contiguous substring that can be replaced with any arbitrary string of the same length to make s balanced. If s is already balanced, return
Constraints:
n s.length
n
n is a multiple of
s contains only 'Q', 'W', 'E', and 'R'
You are given a string s of length n containing only the characters 'Q', 'W', 'E', and 'R'.
A string is called balanced if each of these n
Return the minimum length of a contiguous substring that can be replaced with any arbitrary string of the same length to make s balanced. If s is already balanced, return
Constraints:
n s.length
n
n is a multiple of
s contains only 'Q', 'W', 'E', and 'R'