Coinbase·Software Engineer·Technical Phone Screen
- Design an in-memory banking system with account creation, deposits, and transfers between users. How do you handle error cases like unknown users or insufficient funds?
- Add a method to return the top K accounts ranked by total outgoing spend. What data structure do you use and how do you define tie-breaking?
- Extend the system to support scheduled future payments with unique IDs, cancellation, and a mechanism to advance time and execute due payments.
- Implement a mergeUsers operation that combines two accounts, preserves full transaction history, and handles any scheduled payments that involved the source user after the merge.
“Pretty standard starting point but I fumbled the error handling spec a bit.”