Re:World’s longest palindrome?
by luizfzs on Friday August 10, 2018 @09:53AM
(#17733222)
It's not obvious for me (maybe you are joking and I didn't get it)
[ Parent
| on HN ]
Try substituting other symbols, which makes it easier to see. 1 for ( and 0 for ) for example.
Then we have
1010
and 1001mindblow
Re:World’s longest palindrome?
by sombremesa on Friday August 10, 2018 @12:03PM
(#17734542)
It depends on your definition of palindrome. Is it 'reads the same forwards or backwards' or is it 'had the same characters in the second half as in the first, but in reverse order'?
You'll find that according to most dictionaries, ()() is the palindrome here.
Unless you're a robot.
Try replacing ( with a and ) with b :
abab -> not palindrome
abba -> palindrome