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

18 lines
237 B
JavaScript

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++) {
}
}