Skip to content

Commit

Permalink
Optimization
Browse files Browse the repository at this point in the history
Signed-off-by: begeekmyfriend <[email protected]>
  • Loading branch information
begeekmyfriend committed Jul 17, 2017
1 parent ceaec72 commit 620015e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 022_generate_paratheses/parentheses.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ char** generateParenthesis(int n, int* returnSize) {
stack[2 * n] = '\0';

/* begin and end condition of loop */
while (count == 0 || p != stack) {
while (p != stack || count == 0) {
if (left == n && right == n) {
/* new stacks */
if (count + 1 >= cap) {
Expand Down

0 comments on commit 620015e

Please sign in to comment.