I am getting wrong answer but custom input test case i right

Please resolve this
heres the code

@rudradatta3
hello rudra
in line no 16 it should be j<n .rest of ur logic is correct.
also to pass all the test cases first print minimum and then maximum
i,e if answer is 3,2
then u should print
2 and 3

@rudradatta3
here is ur corrected code link - https://ide.codingblocks.com/s/182443

Hey,
you should simply sort the i/p array since the o/p order matter

and then j should run till n-1
so in the 2nd for loop use j < n

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.