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

Function isPalindrome

CPP/char array/checkpali.cpp:8–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected