Skip to content

Commit 6fdefcf

Browse files
committed
Fix line length issue
1 parent c954633 commit 6fdefcf

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
@@ -5,7 +5,7 @@ def generate_parentheses_iterative(length: int) -> list[str]:
55
The algorithm works as follows:
66
1. Initialize an empty list to store the combinations.
77
2. Initialize a stack to keep track of partial combinations.
8-
3. Start with empty string and push it on stack along with the counts of '(' and ')'.
8+
3. Start with empty string and push it on stack with the counts of '(' and ')'.
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.

0 commit comments

Comments
 (0)