A palindrome is a word, phrase, number or other sequence of units that can be read the same way in either direction.
To check whether a word is a palindrome I get th
Go, Java:
public boolean isPalindrome (String word) { String myWord = word.replaceAll("\\s+",""); String reverse = new StringBuffer(myWord).reverse().toString(); return reverse.equalsIgnoreCase(myWord); } isPalindrome("Never Odd or Even"); // True isPalindrome("Never Odd or Even1"); // False