Back to problems

Reconstruct Billing Status

Object-Oriented Programming · Reddit · Medium

The billing database of an advertising platform was wiped, losing the current balance of every advertiser. Fortunately, a complete historical log of every financial transaction is still intact. Use this history to rebuild the final standing for each user. You are given a 2‑dimensional list transactions that contains records in no particular order. Each record belongs to a single user and may represent an ad‑delivery charge, a payment, or both. Missing monetary values appear…

Checking your access…