Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 353 Bytes

File metadata and controls

16 lines (11 loc) · 353 Bytes

Parenthesis Printing

Given a sequence of open or close parathesis signs, print maximum matches in the order they appear or delete unmatched parathesis signs.

e.g:

  1. in: ((())()) out: ((())())

  2. in: ((())() out: (())()

In the second example, you can interpretatee it as : ?(())() where '?' should be deleted