← Discussions on Is Subsequence
S srinivas_18 OFFICIAL
14 Jul 2026, 16:58

Clean Python 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.

2 replies

pgupta 3 months ago

This should be marked as the editorial approach honestly.

omkarheg8 2 months, 4 weeks ago

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

Sign in to reply.