K
kmalhotra
OFFICIAL
03 Sep 2026, 06:32
Clean C++ solution, beats most submissions.
Work with character counts or indices rather than building new strings in the loop; string concatenation inside loops is what usually causes TLE here.