Number of correctly matched pair of n parenthesis will be a catalan number Cn. You may want to see the application of catalan numbers at http://www.rawkam.com/?p=568 <http://www.rawkam.com/?p=568>
On Tue, Sep 14, 2010 at 8:27 PM, bittu <[email protected]> wrote: > Write a function Brackets(int n) that prints all combinations of well- > formed brackets. For Brackets(3) the output would be ((())) (()()) (()) > () ()(()) ()()() > > > > with explaination dat is at every call what is contant of stack during > pushing and popping > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
