Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A silly trick question: are balanced parentheses expressions palindromes?


No because () reversed is )(


Also, they are not necessarily mirror images:

    (()())()


Yep but I went for the simplest case that answers the question.


Indeed, my comment was more "even if you count `()` as a visual palindrome, it doesn't work".


should we call these symmetromes ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: