Help Needed in debugging. (Generate Parenthesis)

My Code is showing segmentation error on the online IDE but it is showing correct output on the local IDE. Please help me out. https://ide.codingblocks.com/s/241207

@utkarshvashisth94 hey utkarsh your code is working fine I submitted on hackerblocks but in the hackerblocks if(close < open) comes first.

@utkarshvashisth94
your code is working fine but you have to print strings in sorted order (means print single braces first and nested braces later) if you get any problem i have updated it in your code look at this https://ide.codingblocks.com/s/241228

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.