Search found 1 match

by mdb47
Mon Jun 16, 2003 12:18 am
Forum: Volume 2 (200-299)
Topic: 290 - Palindroms <---> smordnilaP
Replies: 31
Views: 7223

290 Can't figure out why it rejects my solution :(

[java]import java.util.*; import java.io.*; class Main { private boolean isPalindrome(String str) { str = str.toUpperCase(); int midPoint = str.length() / 2; for(int i = 0, j = str.length() - 1; i < midPoint; i++, j--) if (str.charAt(i) != str.charAt(j)) return false; return true; } private String r...

Go to advanced search