Sort game challenges Arrays

https://ide.codingblocks.com/s/55913
showing compile successfully on ide
but test case are showing wrong answer and run error

Hy Lavish
You are approaching the problem a little bit incorrectly.
All you have to do is store the inputs as pairs in array write a custom comparator to sort the array as required by the question
Hope this helps