Tap here to switch tabs
Problem
Submissions

Problem: Longest Repeating Character Replacement

Longest Repeating Character Replacement asks for the longest substring that can be made of one repeated character by changing at most k characters.

Statement

Given a string, s, and an integer, k, find the length of the longest substring in s, where all characters are identical, after replacing, at most, k characters with any other uppercase English character.

Constraints:

  • 1≤1 \leq s.length ≤103\leq 10^3

  • s consists of only uppercase English characters.

  • 0≤0 \leq k ≤\leq s.length

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Longest Repeating Character Replacement

Longest Repeating Character Replacement asks for the longest substring that can be made of one repeated character by changing at most k characters.

Statement

Given a string, s, and an integer, k, find the length of the longest substring in s, where all characters are identical, after replacing, at most, k characters with any other uppercase English character.

Constraints:

  • 1≤1 \leq s.length ≤103\leq 10^3

  • s consists of only uppercase English characters.

  • 0≤0 \leq k ≤\leq s.length