Test cases not passing

Hey,

I was facing some issues with the code of the generate parenthesis problem although sample test case passed , in the final submission no test cases passed . Please help me debug my code .The link to the code is

for input n=2
your output
(())
()()
Expected Output
()()
(())

to fix this
just flip the order or recursion call

NOTE : your output should exactly match with expected output

Modified Code

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.