Palindrome exercise without use of String.reverse