Function to check if the string is palindrome
static bool checkPalindrome ( String s ) { for ( int i = 0 ; i < s . Length ; i ++ ) { if ( s [ i ] != s [ ( s . Length - i - 1 ) ] ) return false ; } return true ; }