Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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'
8
bool 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
18
int main(){
19
cin.tie(0)->sync_with_stdio(0);
Callers
1
main
Function · 0.70
Calls
1
length
Method · 0.80
Tested by
no test coverage detected