Object-Oriented Programming · Airbnb · Medium
Build a credit ledger for workspaces. Every workspace is identified by a unique ID and holds a credit balance. The ledger has to support creating workspaces, topping up credits, moving credits between workspaces right away, booking transfers to run at a later time, and cancelling such bookings. About the scope of this reconstruction: the operations above are the ones the source report explicitly attributed to Levels 1 and 3. Level 2 was described only as asking for a topK…