Update LongestPalindromicSubstring.cpp

Add another way to do this.