https://ide.geeksforgeeks.org/20WRcsM8eV

https://ide.geeksforgeeks.org/20WRcsM8eV
When I submitted it with this code it gave me runtime error in one test case and that one was due to line no 43…when I changed my line no 43 to
if(a.ee>b…e)
return 1;
else
return -1;
then it works perfectly fine…

I want to know why the error came due to that…

hey @kaushikjatin
i saw u got 100%
do u still have doubt?

ya…actually I am not asking about the algo…just read my doubt u will get it…

I was getting partial score with on approach…and on a small change I got 100…but the thing I changed is just the way of sorting…see…my original doubt statement for more clearace bro…

u get run error probably for the case then the values are same I not sure why it is happening
had it been c++ I could have helped u better

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.