K deletion

what is wrong in my solution
problem : https://www.codechef.com/CYAU2019/problems/CYAUG02/
my solution : https://www.codechef.com/viewsolution/26094529

I think there should be suf[i+k+1] instead of suf[i+k]

its still giving wrong answer

I think i+k should be i+k-1

pls can u tell in which line i have to make what change? i can’t figure out…

I think i+k should be i+k-1
change this in inline 135 and 140
may be it will give AC

it worked !! but why we use i+k-1 instead of i+k @gourav_987

thanks bro all doubts cleared