Pergunta de entrevista da empresa Veeva Systems

Easy to medium algorithm question