[LeetCode] Maximize the Confusion of an Exam

1 · · June 11, 2022, 2:42 a.m.
2024. Maximize the Confusion of an Exam A teacher is writing a test with n true/false questions, with ‘T’ denoting true and ‘F’ denoting false. He wants to confuse the students by maximizing the number of consecutive questions with the same answer (multiple trues or multiple falses in a row). You are given a string answerKey, where answerKey[i] is the original answer to the ith question. In addition, you are given an integer k, the maximum number of times you may perform the following operation...