educative.io

Educative

Longest Substring with Same Letters after Replacement (hard) - Grokking the

I can’t seem to grasp my mind around why we don’t need to adjust(decrement) maxRepeatLetterCount in the inner condition. I got the part till if condition, but the part inside if went over head. Please elaborate on this.