Marlabs Interview Question

Pretty easy and basic