@@ -0,0 +1,1142 @@
+// http://www.codeabbey.com/index/task_view/palindromes%0A %0Aimport java.util.Scanner;%0A %0Aclass Solution%0A%7B%0A%09%0A%09static boolean isPalindrome(String input) %7B%0A%09%09boolean isPalindrome = true;%0A%09%09%0A%09%09for (int i = 0, j = input.length()-1; i %3C input.length() / 2; ++i, --j) %7B%0A%09%09%09if (input.charAt(i) != input.charAt(j)) %7B%0A%09%09%09%09isPalindrome = false;%0A%09%09%09%09return isPalindrome;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09return isPalindrome;%0A%09%7D%0A%09%0A    public static void main(String%5B%5D args)%0A    %7B%0A        Scanner read = new Scanner(System.in);%0A        %0A        int numberOfPhrases = read.nextInt();%0A        %0A        // Clear buffer%0A        read.nextLine();%0A        %0A        for (int i = 0; i %3C numberOfPhrases; ++i) %7B%0A        %09String phrase = read.nextLine();%0A        %09phrase = phrase.toUpperCase();%0A        %09phrase = phrase.replaceAll(%22%5C%5CW+%22, %22%22); // remove all non-word characters, including whitespaces%0A        %09%0A        %09// Determine if the String is a palindrome%0A        %09if (isPalindrome(phrase)) %7B%0A        %09%09System.out.print(%22Y%22 + %22 %22);%0A        %09%7D%0A        %09else %7B%0A        %09%09System.out.print(%22N%22 + %22 %22);%0A        %09%7D%0A        %7D%0A       %0A        // Close scanner%0A        read.close();%0A    %7D%0A%7D%0A

Create Palindromes.java