Try this:

Find the number of ways for generating n pairs of valid parenthesis.
A set of parenthesis is said to be valid if at any instant while scanning
from left to right, the number of opening parenthesis are never less than
the number of closing parenthesis.

For ex: for n=3, f(n) = 5

()()(), ((())), (()()), ()(()), (())()

Cheers
Nikhil Jindal

Please access the attached hyperlink for an important electronic communications 
disclaimer: http://dce.edu/web/Sections/Standalone/Email_Disclaimer.php

-- 
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.

Reply via email to