Level 1: Basic banking operations. Needs to support:
create_account(timestamp, account_id)
deposit(timestamp, account_id, amount)
transfer(timestamp, source_account_id, target_account_id, amount)
Level 2: Top Spenders
Requirement:
rank accounts based on the total value of outgoing transactions
Adds something like:
top_spenders(timestamp, n)
Level 3: Scheduled Payments. The system needs to support:
- schedule payment
- accept payment
The biggest trap here is the timestamp execution order. It's not just "store a record when schedule_payment is called" and that's it. Every time an operation happens after that, you may first have to process the scheduled payments that should have executed before that timestamp.
Level 4: Merge Accounts. The last level is merge accounts. The requirement is roughly:
merging accounts while retaining both accounts' balance and transaction histories
I didn't finish the third part, only got 440 points. I'm guessing I failed.
Discussion
Loading comments…