this is my code , I am getting correct for all but getting run-error for the first test case.
Getting run error for first test case
i found error in your sort function
Collections.sort(l,new compare());
if i remove this line then the verdict is wa instead of runtime. Please see whats wrong in comparotor in class. I code in c++ so i dont know how compartor or sort function works in java… you can contact sanjeet mam if you are unable to figure out whats wrong now also
Sorry I am unable to figure out that what is wrong because it is just a comparator like in c++.
@sanjeetboora please help me
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.