The netBalances function currently has O(n²) complexity due to nested loops with find() operations. For typical group sizes (~10 users), this is acceptable, but could be optimized to O(n) using a Map for balance lookups.
Consider using a Map to store balances by their userFrom-userTo key for O(1) lookups, reducing overall complexity to O(n).
This was identified in Copilot AI review of PR #24.