Skip to content

Commit 8510873

Browse files
Update generate_parentheses_iterative.py
1 parent 4bee601 commit 8510873

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtracking/generate_parentheses_iterative.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def generate_parentheses_iterative(length: int) -> list:
99
4. While the stack is not empty:
1010
a. Pop a partial combination and its open and close counts from the stack.
1111
b. If the combination length is equal to 2*length, add it to the result.
12-
c. If open count is < length, push new combination with added '(' onto the stack.
12+
c. If open count < length, push new combination with added '(' on stack.
1313
d. If close count < open count, push new combination with added ')' on stack.
1414
5. Return the result containing all valid combinations.
1515

0 commit comments

Comments
 (0)