AlgoDaily Solution
1Locked, only available for premium members.
Community Solutions
Community solutions are only available for premium users.
Access all course materials today
The rest of this tutorial's contents are only available for premium members. Please explore your options at the link below.
xxxxxxxxxx
35
var assert = require('assert');
function minimumParenthesesRemoval(s) {
return;
}
try {
assert.equal(minimumParenthesesRemoval('a)b(c)d'), 'ab(c)d');
console.log('PASSED: ' + "`minimumParenthesesRemoval('a)b(c)d')` should return `'ab(c)d'`");
} catch (err) {
console.log(err);
}
try {
assert.equal(minimumParenthesesRemoval('alg(o(d)a)il)y'), 'alg(o(d)a)ily');
console.log('PASSED: ' + "`minimumParenthesesRemoval('alg(o(d)a)il)y')` should return `'alg(o(d)a)ily'`");
} catch (err) {
console.log(err);
}
try {
assert.equal(minimumParenthesesRemoval('))(('), '');
console.log('PASSED: ' + "`minimumParenthesesRemoval('))((')` should return `''`");
} catch (err) {
console.log(err);
}
OUTPUT
Results will appear here.