Search
⌘K

Leetcode 2024. Maximize the Confusion of an Exam

Given a string of 'T'/'F' answers and at most k flips, maximize the length of a contiguous run of identical answers by changing up to k characters. This reduces to finding the longest substring containing at most k characters different from a chosen target ('T' or 'F'), typically solved with a sliding-window/two-pointer approach.


Question Timeline

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

Comments

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