Loop to find if any palindromic string is still left in the array
for ( int i = 0 ; i < n ; i ++ ) { string s = a [ i ] ; reverse ( a [ i ] . begin ( ) , a [ i ] . end ( ) ) ; if ( a [ i ] != " " ) { if ( a [ i ] == s ) { s1 = a [ i ] ; break ; } } } string ans = " " ;