Conceptual doubt

sir,can you tell me weather in subset based recursion problem like above we should think by pmi approach or first thinking of recursion tree and then building our logic?

@varu,
If the problem only asks to count, then you may use pmi or pnc, but If the problem asks to actually print(like in this problem) you don’t have a choice but to use recursion.

sir pmi means principle of mathematical induction

@varu,
Yes, I know that, and how can you print bracket sequence using pmi, last time I checked, it was used for proving formulas?