We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e82a361 commit 74af51dCopy full SHA for 74af51d
src/main/java/com/fishercoder/solutions/_22.java
@@ -37,15 +37,15 @@ public List<String> generateParenthesis(int n) {
37
return result;
38
}
39
40
- void backtrack(List<String> result, String par, int left, int right) {
+ void backtrack(List<String> result, String parenthesis, int left, int right) {
41
if (left > 0) {
42
- backtrack(result, par + "(", left - 1, right);
+ backtrack(result, parenthesis + "(", left - 1, right);
43
44
if (right > left) {
45
- backtrack(result, par + ")", left, right - 1);
+ backtrack(result, parenthesis + ")", left, right - 1);
46
47
if (right == 0) {
48
- result.add(par);
+ result.add(parenthesis);
49
50
51
0 commit comments