i am little bit confused in understanding the question
Confused in understanding question
int this question you have to Print all combinations of balanced parentheses for given n where n is max number of opening braces
Input: n=1
Output: ()
Explantaion: This the only sequence of balanced parenthesis formed using 1 pair of balanced parenthesis.
Input : n=2
Output: ()()
(())
Explantaion: This the only two sequences of balanced parenthesis formed using 2 pair of balanced parenthesis.
i hope now question is clear
i write a code but order of printing parenthesisis different
order should be same as given in question
try to make some changes so that it print correct output