This question evaluates skills in string processing, frequency analysis, and algorithmic optimization within the Coding & Algorithms domain, focusing on practical application of linear-time, constant-space techniques.
Given a string s (ASCII, length up to 2e5) and integer k (0 ≤ k ≤ |s|), return the length of the longest substring that can be turned into all the same character by replacing at most k characters. Constraints and requirements: