Pergunta de entrevista da empresa Emergent Software

leetcode easy to medium problem