You are viewing a single comment's thread. Return to all comments →
int i=0,j=A.length()-1; while(A.charAt(i)==A.charAt(j) && (i++)<=(j--)); System.out.println(i>=j?"Yes":"No");
Simple logic and would work even in C/C++
Seems like cookies are disabled on this browser, please enable them to open this website
Java String Reverse
You are viewing a single comment's thread. Return to all comments →
Simple logic and would work even in C/C++