I want to know the output for n=3.
My output is
((()))
(()())
(())()
()(())
()()()
Python Parenthesis Problem Output Doubt
hey you might have done
if openbrackets>0 first and then closebrackets constraint. just reverse the order
1 Like