Can you help find the mistake in my code

my sample testcase output is correct and i tried the output for other inputs ,which was also coming correct.

use string to store result
idk char array is giving error probably size issue

how to print the answer in reverse order without using a stack.can we do it using recursion only?

I am not using stack
i am simply sorting the vector

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.