Approach hintTry it first, then revealHide
Reverse the process: one operation can be undone only when the two ends hold different characters. Move one index from each end inward while that remains true.
Reverse the process: one operation can be undone only when the two ends hold different characters. Move one index from each end inward while that remains true.