For given n find the number of valid combinations of valid parenthesis.I told him direct formula of
Catalan number(becuase i encountered this prob earlier) but he specifically wanted this problem Solution using dynamic programming and wanted working solution with explanation with Test cases.I didn't managed to get to the working solution.
Eg n=1 valid par=0
n=2 valid par=1