Failing test cases

can you please tell what is wrong with my code

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

correct output
()()
(())

every thing okay
just you have to reverse the order of calling recursion

look at Modified Code

Modified code

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like :heart:: and don’t forgot to mark doubt as resolved :grinning: