Palindromic Substrings
Given a string s,
Return the number of palindromic substrings in it. A string is a palindrome when it reads the same backward as forward. A substring is a contiguous sequence of characters within the string.
Basically we have to find out the count of all the possible palindromic substrings from a string.
For this I have used two solutions, one may look easy to you and other one hard, please mention below in the comments which one you find easy or hard.
I would have provided you with the test version of the code, but i wanted you all to practise, so i did it intentionally keeping the pictures of the solution above.
This question is mostly being asked in the interviews so prepare well and keep coding…