Mastercard interview question

was pretty straightforward