Sort game in searching and sorting

unable to find error

Hi Jonty
Kindly share your code ide so that i can have a look.

Here in your code you are getting run error because of the size of pair array. As n can be upto 10^5 so you have to make your pair array according to that. And also while printing in the if statement condition should be emp[i].second>=min . Your were missing = sign here it is why test cases were giving wrong ans.