Deliveroo interview question

Simple programming exercise. Easy question.