Why not passing test case 2 all other are passed

Hello @codingblockscpp,

Your code is failing for the case:
15
12 10 17 22 20 85 74 38 23 64 46 51 65 99 87
10 12 17 20 22 23 38 46 51 64 65 74 85 87 99
Expected Output:
15
Your Output:
10

Correct it.
Hope, this would help.
Give a like if you are satisfied.

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.