Recursion output cannot be static


Hi Guys my code is returing
() (())
and interviewbit expecting
(()) ()
it should not check sequence both are correct answers kindly fix this issue


Sure that both should be in the output array/vector. BTW, did you arrange the output in ascending order (string comparison)?


sort and print it will work as mentioned above you required sorted arraylist.


Reversing the list worked for me. Both the answers should have marked as correct by the platform. not sure why its like that.