Program in C++
1. Implement an algorithm to print all valid, that is, properly opened and closed, combina tions of n-pairs of parenthesis. Further, fill in the parenthesis with the number indicating the number of pairs it is enclosed in. For example, if n 2, the output would be and if n 3, the output would be: Note that the number of such pairs is a Catalan number, given by 1 (2n nn1n The Catalan numbers for
OR
OR