Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 325 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 325 Bytes

This problem was asked by Facebook.

Given a string of parentheses, find the balanced string that can be produced from it using the minimum number of insertions and deletions. If there are multiple solutions, return any of them.

For example, given "(()", you could return "(())". Given "))()(", you could return "()()()()".