Solution for #401 Palindromes