DEV Community

Discussion on: Solution: Longest Valid Parentheses

Collapse
 
indoor_keith profile image
Keith Charles • Edited

Hey there, just wanted to clarify what "longest valid" means. if S = '())()()' would the longest be '()', '()()', or '()()()'?

Collapse
 
indoor_keith profile image
Keith Charles

Ah okay, '()()' would be the answer, never mind!