Form Biggest Number

give’s the correct answer but didn’t pass the test case

code:- https://ide.codingblocks.com/s/614465

ans of each testcase should be in different line so
after every testcase print endl

also your code’s time complexity is o(n^2)
basically you are doing sorting but in n^2
you can also do this in nlogn
Like this

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.