Pergunta de entrevista da empresa Oxehealth

A leetcode style question (no spoilers here)