Special pelindrom


https://hack.codingblocks.com/app/dcb/1419

while checking for even and odd lenths of pelindrom i am getting a error i have created substrings

the question is of daily code problem and the problem is as gievn :-
A string is called special if after merging all the consecutive equal characters, the resulting string is palindrome. For example, “abba” is special, because after the merging step it will become “aba”.

Given a string, you have to find two values:

the number of special substrings of even length;
the number of special substrings of odd length.