i want to generate parenthesis but it gives me some random output! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

i want to generate parenthesis but it gives me some random output!

Can anybody check my code and please suggest me to do some changes for my expected output? Please check my code and find issue? https://code.sololearn.com/c9MCNzYPCMSP/?ref=app My expected outputs: Input: n = 3 Output: ["((()))","(()())","(())()","()(())","()()()"] Input: n = 1 Output: ["()"]

8th Dec 2022, 5:39 AM
follow ->
follow -> - avatar
1 Answer
+ 3
Bug resolved by my own 😄
8th Dec 2022, 8:57 AM
follow ->
follow -> - avatar