Question : “https://www.hackerrank.com/contests/all-india-contest-by-mission-helix-a-31-october/challenges/palindromic-query”
My solution : “https://ideone.com/wLCarq”
I don’t know why it gives me TLE for some of TC’s, no editorials too , so I m unable to find a more optimized solution, can anyone please help