What is doing wrong in my code "Please help "

i just check if given string s is palindrome for string s from l to r. i write down dp recursive code but not able to write properly

which question is this ?

Problem -->
given a string and q queries in each queris you are given l and r and you have to check if there is a
Palindromic substring from l to r in given string or not.
“please help me i am doing it by dp but have stuck on one point”
Thanks