Stripe interview question

Algorithmic programming exercise of a financial themed problem