Here is the interview question prompt, presented for reference.
Given a string s
that contains parentheses and letters, remove the minimum number of invalid parentheses to make the input string valid. Return all the possible results.
For example, consider the following string as input:
s = "()())()"
The correct solution should return ["(())()","()()()"]
, with both possibilities.
Note: this problem is similar to Minimum Parentheses Removal, with the difference being that we want to return all possible valid string results.
s
.length <= 25s
consists of lowercase English letters and parentheses '('
and ')'
.s
.You can see the full challenge with visuals at this link.
Challenges • Asked over 2 years ago by Jake from AlgoDaily
This is the main discussion thread generated for Remove Invalid Parentheses (Main Thread).
Are there any excellent javascript to c# converters available to help in answering the questions?