Find the even length palindrome with center points as i - 1 and i .
while ( l >= 0 && r < n && s [ l ] == s [ r ] ) { ans2 += s [ l ] ; l -- ; r ++ ; } v . push_back ( ans1 ) ; v . push_back ( ans2 ) ; } string ans = v [ 0 ] ;