LeetCode/dynamic-programming/22-generate-parenthesis/js/index.js

18 lines
237 B
JavaScript
Raw Normal View History

2021-08-03 12:42:59 -05:00
function generateParenthesis(n) {
if (n == 1) {
return ['()'];
}
if (n == 2) {
return ['()()', '(())'];
}
const input = [];
for (i = 0; i < n; i++) {
input.push('()');
}
for(i = 0; i < n; i++; i++) {
}
}