Plz check my logic

not passing all the test cases
code is in submission

hello @mohitsingh

u need to print in sorted order.

store all ur output data in vector, sort the vector and then print it

now plz one test case not passing

pls share ur updated code by saving it on cb ide

check now->

incase of no results ,u have to print 0.

also nextime onwards pls use cb ide for code sharing, it will be convenient for both of us

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.