Has anyone seen this question in LeetCode? It might not be in the same title.
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.