Official editorial: SWAPPALI - Editorial
Link: SWAPPALI Solution - CodeChef February Lunchtime 2020 - YouTube
7 Likes
There’s a special case in the loop when l+1==r
1 Like
I think you are also missing the special case with l+1==r
1 Like
Sir,can you help ,why am i getting TLE in swappali in one of the second subtask
link to my solution : CodeChef: Practical coding for everyone
Copying strings is O(n) time, and you do that in each iteration.
thank you sir
I’m still working on it. I hope people can be understanding with late editorials. Detailed writeups take a lot of time, and by the way, a lot of the problems for this contest (including SWAPPALI) were not fully prepared until several hours before the contest. There was even one problem that was finished 5 minutes before the contest started.
Ok take your time.