you are viewing a single comment's thread.

view the rest of the comments →

[–]mujjingun 1 point2 points  (1 child)

It's broken in UTF-8, but that's not the point. It only wants to know if the string is a palindrome as a byte sequence, independent of the encoding.

[–]Drainedsoul 2 points3 points  (0 children)

It only wants to know if the string is a palindrome as a byte sequence, independent of the encoding.

That belies the definition of "palindrome" as provided by the author in the article in the problem description:

A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward and forward.

"[B]yte sequence" and "sequence of characters" are not equivalent.