cpp implementation of Longest Parlindromic Substring