As all the combination are generated but order is not correct

for ex n=2;
(())
()()
generated but the required output is
just opposite.

hello @Nidhi_Alipuria
interchange line no 18 and 19.
it will work.

image