Skip to content

Instantly share code, notes, and snippets.

@priort

priort/HaskellIntro2.java Secret

Created Dec 30, 2018
Embed
What would you like to do?
public class Palindrome {
public static boolean isPalindrome(String str) {
int strEndIndex = str.length() - 1;
for(int i = strEndIndex; i > (strEndIndex/2); i--)
if(str.charAt(i) != str.charAt(strEndIndex - i))
return false;
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.