Algorithm · Pinduoduo · Medium
You are given a string s made up entirely of uppercase English letters and an integer k. You may perform at most k operations, where one operation consists of choosing any index in s and changing its character to any other uppercase English letter. After performing at most k operations, return the maximum possible length of a contiguous substring that consists of a single repeated letter. Example 1: Explanation: The substring "AAB" can become "AAA" by changing the 'B' once.…
Checking your access…