Special String Again

  • + 0 comments

    Because this is special palindrome string, case 2: All characters except the middle one are the same, e.g. aadaa. So there is no need to consider i-2 and i+2. two neibors should be same.