You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Longest Substring with Same Letters after Replacement (hard)
2
+
# Given a string with lowercase letters only, if you are allowed to replace no more than ‘k’ letters with any letter, find the length of the longest substring having the same letters after replacement.
3
+
4
+
# Input: String="aabccbb", k=2
5
+
# Output: 5
6
+
# Explanation: Replace the two 'c' with 'b' to have a longest repeating substring "bbbbb".
0 commit comments