I tried running this code on coding blocks ide but it’s not giving correct output even though I have written the same code from the video. Also, I am using Dev c++, and on that also, I am not getting brackets in the output.
Also, in line 12 and line 19 of my code why are we not putting equals to condition along with less than.
Generate Brackets Recursion
Try this:
no, of opening brackets cannot be equal to n and no. of closing brackets should always be less than n when we are putting another closing bracket. So we don not put equal to sign.