LendInvest Interview Question

Just had the code test