[palindrome] Fixed the mistake in brute-force algorithm