Regarding the time complexity

if we use linear search to find the largest debiters and crediters to settle the minm no. of transactions why will the time complexity be O(N^2)?

Hello @Senjuti256 have you written the code for it ?
i am not sure about it.
though i think we were maintaining a queue pr multiset for it that could be the reason.
if you have written the code please share that i will confirm you.

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.