Design an In-Memory Banking System
Medium · Low-Level Design · about 50 minutes
Asked at Coinbase.
Design an in-memory banking system, built up in levels. Level 1: create accounts, deposit, and transfer between accounts. Level 2: report the top K accounts by outgoing money. Level 3: schedule a payment to run at a future timestamp, with cancel. Level 4: merge two accounts. Every operation takes a timestamp, and operations arrive in time order.