macher algorithm

for palindrome