MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / isPalindrome

Function isPalindrome

CPP/recursion/is_pali.cpp:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#define mod 1000000007
7#define endl '\n'
8bool isPalindrome(char s[],int i,int n){
9 if(i>=n/2)
10 return true;
11 if(s[i]!=s[n-i-1])
12 return false;
13 return isPalindrome(s,i+1,n);
14}
15int main(){
16 cin.tie(0)->sync_with_stdio(0);
17 int n;cin>>n;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected