When I test the code with custom input it gives me correct answer, but when I sub

When I test the code with custom input it gives me correct answer, but when I submit my solution it fails.
on submit my code is generating output as such the input was sorted in first place.

Click here to start solving coding interview questions