Generate Parenthesis

Why I am getting empty output ?

modified code

this is correct way to do this

if you first increase close_count then it will effect the next recursive call
which is not correct