2024年10月14日 · Solution from tester. ## AnalysisConsider an upper bound of $k$. ### When a majority of $s$ doesn't existSince a string of length $1$ must be a palindrome, $k$ must be no more than $\left\lfloor\dfrac n2\right\rfloor$. The following algorithm gives such a construction.