Valon's onsite format is pretty unusual: you get 2 hours to implement one problem. The goal is to build a banking service made up of 5 parts. My feeling is that you need to get through at least parts 3-4, but you are not required to finish everything.
How the time is split:
First 30 minutes: go through the problem with an engineer, discuss the design, and start building.
Middle 90 minutes: you write the code on your own.
Last 30 minutes: another engineer joins the call, and you do a code walkthrough together, discussing your approach and the design decisions in it.
After the technical round there is also an HM interview, with the usual behavioral questions about teamwork, communication, leadership, etc.
Problem: every step comes with input/output.
Step 1: Build a BankService that support ATM transfers: View balance, deposit and withdraw cash
class ValonBankService:
""" Code to be evaluated """
def get_current_balance(...):
pass
def deposit_cash(...):
pass
def withdraw_cash(...):
pass
class FileInterface:
""" Used for debugging/testing purposes only
We don't care about the code in this class, you can even hardcode the file paths if you'd like. """
def perform_bank_actions():
# reads in input file
# calls ValonBankService functions
pass
def write_bank_statements():
# calls ValonBankService functions
# writes to output file (based on whatever step you're on)
pass
FileInterface.perform_bank_actions()
FileInterface.write_bank_statements()
Sample output:
account amount
PEACH1111 $5.00
PEACH2222 $10.00
PEACH3333 $15.00
Step 2: Add support to display transactions per account. We want to track all transactions, even those that have failed. The columns are time, account, credit, debit, status, type, balance. Sample rows:
2020-08-01 1:00:00 | PEACH1111 | $10.00 | SUCCESS | ATM | $10.00
2020-08-01 7:00:00 | PEACH1111 | $5.00 | SUCCESS | ATM | $5.00
2020-08-01 5:00:00 | PEACH2222 | $20.00 | SUCCESS | ATM | $20.00
2020-08-01 6:00:00 | PEACH2222 | $25.00 | FAILED | ATM | $20.00
Step 3: Create a function that transfers funds from one account to another
def instant_transfer(...):
pass
2020-08-01 6:00:00 | PEACH1111 | $2.00 | SUCCESS | INSTANT TRANSFER | $7.00
Step 4: Support transfers to/from external bank, each external transfer will incur a fee
2020-08-01 7:00:00 | PEACH2222 | $5.00 | SUCCESS | INSTANT TRANSFER | $13.00
2020-08-01 7:00:00 | PEACH2222 | $0.01 | SUCCESS | FEE | $12.99
Step 5: Create a function to support slow fund transfers. Assume that once you initiate a slow transfer, the funds are no longer usable until they reach the ending bank account
2020-08-01 6:00:00 | PEACH1111 | $2.00 | SUCCESS | SLOW TRANSFER | $7.00
Discussion
Loading comments…