2 test cases are wrong

I am unable to understand the mistake.
please explain with an example why am I getting WA.

MY CODE :https://ide.codingblocks.com/s/377795

Consider the testcase:
15
78 7 62 28 73 68 94 88 65 61 59 21 92 4 97
90

in this, ur code do not give the answer in lexiographical order

Thanks. Now I got it.

please mark your doubt as resolved :slight_smile: