Generate Parentheses

Running for sample test cases.
But not passed any test cases.

Your code works fine, and the logic also. It’s not passing test cases because of the output format. If condition of line number 13 should be computed first and then if condition of line 9 should be dealed to get desired output. If this solved your doubt. Please mark it as resolved :slight_smile: