Back to DSA sheet
Longest Repeating Character Replacement
MediumSliding WindowFind the longest substring where, after replacing at most k characters, all characters are the same.
Constraints
- 1 <= s.length <= 10^5
- 0 <= k <= s.length
Sheets
Blind 75NeetCode 150NeetCode 250
longest-repeating-character-replacement.cpp
Loading editor
Custom input (stdin)
Output
Run your code to see its output.