Why test case 1 is failing


HERE IS THE CODE

hi @hhiteshbansal_40d12e2460a1738e
I have already shared the soln with u… kindly go through it…

no solution is shared before of this problem and i also want to know what is input for test case 1 as it is failing

hi @hhiteshbansal_40d12e2460a1738e
refer this

yes but why test case 1 is failing i want the reason of error …

ur code is failing on test case–>

73
10
Tarun 52
Sanjeet 36
Prateek 47
Pranav 86
Sneha 73
Sohail 4
Jatin 12
Mehak 69
Abhishek 92
Bipin 88

expected o/p–>

Abhishek 92
Bipin 88
Pranav 86
Sneha 73

ur o/p -->

Abhishek 92
Bipin 88
Pranav 86

there was just a small mistake in ur code in line 32

if (emp[i].second>key )
u had written this.. but it should be >=
if (emp[i].second>=key )

just change this ur code will pass all test cases…
corrected code --> https://ide.codingblocks.com/s/644033

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.