human
Recursive function to check if a string is palindrome | A recursive function that check a str [ s . . e ] is palindrome or not ..
If there is only one character.
If first and last characters do not match.
If there are more than two characters , check if middle substring is also palindrome or not ..
An empty string is considered as palindrome.
Driver Code"
Solution in Python:
 ... Write me a code to recursive function to check if a string is palindrome and the other steps required?
assistant
#Here is code to recursive function to check if a string is palindrome and the other steps required.
 def isPalRec ( st , s , e ) :
	if ( s == e ) :
		return True
	if ( st [ s ] != st [ e ] ) :
		return False
	if ( s < e + 1 ) :
		return isPalRec ( st , s + 1 , e - 1 ) ;
	return True
def isPalindrome ( st ) :
	n = len ( st )
	if ( n == 0 ) :
		return True
	return isPalRec ( st , 0 , n - 1 ) ;
st = " geeg "
if ( isPalindrome ( st ) ) :
	print " Yes "
else :
	print " No "