Skip to content

Instantly share code, notes, and snippets.

@rikaardhosein
Created April 17, 2012 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rikaardhosein/2409530 to your computer and use it in GitHub Desktop.
Save rikaardhosein/2409530 to your computer and use it in GitHub Desktop.
Recursive isPlaindrome
bool isPalindrome( char *string, unsigned int l, unsigned int r )
{
if( l >= r )return true;
if( string[l] != string[r] ) return false;
return isPalindrome( string, l+1, r-1 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment