You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in PR #58, the algorithm for minimising transactions is currently O(k * n log n), where k is the number of debts, and n is the number of users.
We can optimise the algorithm to O(n log n) by denormalising the user debts.
The algorithm currently spends O(k) time going through all debts and calculating the net debt for each user.
If we store this in a separate collection and update it every time a debt pair is updated, we'll save repeated work.
The text was updated successfully, but these errors were encountered:
Specification
The text was updated successfully, but these errors were encountered: