Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ palindrome
Function
palindrome
CPP/char array/string.cpp:3–14 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
#include<bits/stdc++.h>
2
using namespace std;
3
string palindrome(string s){
4
5
for (int i = 0; i <s.size()/2; ++i)
6
{
7
if(s[i]!=s[s.size()-i-1]){
8
return
"no"
;
9
10
}
11
12
}
13
return
"yes"
;
14
}
15
int main(){
16
/*string s;
17
s=
"siddhu"
;
Callers
1
main
Function · 0.85
Calls
1
size
Method · 0.45
Tested by
no test coverage detected