Pregunta de entrevista de Deliveroo

Simple programming exercise. Easy question.