https://codeforces.com/problemset/problem/708/A

i want to discusss my approach on this question as it is giving wa but i am not able to find where i am wrong. if someone willing to help pls reply

this is my solution

for input : a
the only substring you can pick is β€œa” itself , in that case answer should be β€œz” (after shift) , but your program prints β€œa” only , try to debug this first

1 Like

thanks i have debug it i got the missing case but now it is showing tle. i have done using one traversal only

s1=s1+x takes O(n) time. You need to use a stringbuilder.

1 Like

thanks bhai got it. i follow you on youtube and also on linkedin. Thanks for help

1 Like

you’re welcome man , and good luck for next problems

1 Like