Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). 1. If there is no such window in S that covers all characters in T, return ...
Explanation: We can swap the first 'b' with the last 'a', or the last 'b' with the first 'a'. Then, the longest repeated character substring is "aaa", which its length is 3. Explanation: Swap 'b' with ...