Is Palindrome Problem

In 2 test cases timelimit exceede error is coming
Please resolve error

I have edited your code… Try to submit now…

can u tell what was mistake in my code why it was showing timelimit exceede error

This was because in your code, when s[l]!=s[r], then you simply print false, but still you kept on doing l++, and r–, instead, you need to use break statement… So even your string was not palindrome, it kept on checking and Thus resulted in TLE…