G
gurpreet_42
25 Jul 2026, 17:56
Asked in my Juspay OA last week.
Work with character counts or indices rather than building new strings in the loop; string concatenation inside loops is what usually causes TLE here.