Add classes for 'Longest Palindromic Substring'.
Minor refactoring for 'Longest Palindromic Substring'.