/* * @lc app=leetcode id=301 lang=javascript * * [301] Remove Invalid Parentheses * * https://leetcode.com/problems/remove-invalid-parentheses/description/ * * algorithms * Hard (38.52%) * Total Accepted: 114.3K * Total Submissions: 295.4K * Testcase Example: '"()())()"' * * Remove the minimum number of invalid parentheses in order to make the input * string valid. Return all possible results. * * Note: The input string may contain letters other than the parentheses ( and * ). * * Example 1: * * * Input: "()())()" * Output: ["()()()", "(())()"] * * * Example 2: * * * Input: "(a)())()" * Output: ["(a)()()", "(a())()"] * * * Example 3: * * * Input: ")(" * Output: [""] * */ /** * @param {string} s * @return {string[]} */ var removeInvalidParentheses = function(s) { };