Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
praptak
on Feb 22, 2019
|
parent
|
context
|
favorite
| on:
A Brutal Look at Balanced Parentheses, Computing M...
A silly trick question: are balanced parentheses expressions palindromes?
noir_lord
on Feb 22, 2019
[–]
No because () reversed is )(
pygy_
on Feb 22, 2019
|
parent
|
next
[–]
Also, they are not necessarily mirror images:
(()())()
noir_lord
on Feb 22, 2019
|
root
|
parent
|
next
[–]
Yep but I went for the simplest case that answers the question.
pygy_
on Feb 22, 2019
|
root
|
parent
|
next
[–]
Indeed, my comment was more "even if you count `()` as a visual palindrome, it doesn't work".
agumonkey
on Feb 22, 2019
|
parent
|
prev
[–]
should we call these symmetromes ?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: