Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

palindrome string

int isPlaindrome(string S)
	{
	    // Your code goes here
	    int flag =0;
	    int l=0;
	    int h=S.length()-1;
	    while(h>l){
	        if(S[l++]!=S[h--]){
	         return 0;
	        }
	    }
	    return 1;
	}
Source by www.sanfoundry.com #
 
PREVIOUS NEXT
Tagged: #palindrome #string
ADD COMMENT
Topic
Name
2+7 =