MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / isPlaindrome

Method isPlaindrome

PalindromeString.java:2–16  ·  view source on GitHub ↗
(String S)

Source from the content-addressed store, hash-verified

1class Solution {
2 int isPlaindrome(String S) {
3 // code here
4 int start=0;
5 int end=S.length()-1;
6 while(start<end)
7 {
8 if(S.charAt(start)!=S.charAt(end))
9 {
10 return 0;
11 }
12 start++;
13 end--;
14 }
15 return 1;
16 }
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected