Given a String s, count all special palindromic substrings of size greater than 1. A Substring is called special palindromic substring if all the characters in the substring are same or only the middle character is different for odd length.Example “aabaa” and “aaa” are special palindromic substrings and “abcba” is not a special palindromic substring.
Input: the first line of input contains integer T denoting the number of test cases. Each test case contains string S.
For each test case, print count of special palindromic substrings.
tese case 1 : All Special Palindromic substring size > 1 are : "aba", "bab"
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.