[palindrome] Updated the palindromic sub-string formula; Added implementation details