Generate bracket rec

why we take idx==2*n in a base case ???

hello @abhinav17
idx==2n indicates that we have already filled all [0…2n-1] indexes and now we are at 2n ,which means we have got the string of size 2n thats why its our base case.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.