Search
⌘K

Leetcode 424. Longest Repeating Character Replacement

Find the length of the longest substring that can be turned into all the same letter by performing at most k character replacements; this is typically solved with a sliding-window and frequency counts, expanding the window while ensuring window_size - max_char_count <= k.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early October, 2025

Meta

Mid-level

Comments

Your account is free and you can post anonymously if you choose.