← Discussions on Valid Palindrome
R rohitchowdary
12 Jul 2026, 13:42

Finally got AC after 3 WAs. Sharing what I missed.

Work with character counts or indices rather than building new strings in the loop; string concatenation inside loops is what usually causes TLE here.

1 reply

dkaur 2 months, 4 weeks ago

For the TLE: you are rebuilding the list inside the loop, move it outside.

Sign in to reply.