Solution got submitted successfully on leetcode but here showing Run error for one test case and wrong submission for another test case

As in problem, it is not written that we have to return response in any particular order. Then why judge is showing wrong answer if i am returning correct response but the order of values are not matching.
Please make a little better algorithm for code evaluation.

Now let me know how can i get full points for this problem??

read Question carefully

now send the link of your code i will check

Thanks for pointing out that sorted result is required.

Here is the link to the code - https://ide.codingblocks.com/s/587997

Did you find anything?

Please reply. not able to solve this…

any update on 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.