Agoda interview question

Paranthesis generator with Dynamic Programming