my sol : https://ide.codingblocks.com/s/298508
problem link: https://leetcode.com/problems/longest-palindromic-substring/
i am really stuck
my sol : https://ide.codingblocks.com/s/298508
problem link: https://leetcode.com/problems/longest-palindromic-substring/
i am really stuck
Hello @souravrao3110, your code is absolutely fine but I think you don’t know exactly how to use the substring func or got confused with something else.
Here we have the first argument as the starting index and the second argument as the length from this index onwards.
So it must be this
return s.substr(start,end-start+1);
I hope it will be clear to you !!
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.