Solution is correct

I tried a problem. is it correct?

Please tell me

hi @roshani1997abr_911f71e73100e81b,
if u just sort the array u will get wrong ans
eg 10,100
your ans will be 10010 but ans is 10100
refer code : https://ide.codingblocks.com/s/661893

without compactor func it’s not working.
but we are sorting a value . why it’s not working.

Can we do without a stl.

u need comp function else it will not pass all test cases, as i gave eg

1 Like

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.