Pregunta de entrevista de Meta

Standard HackerRank-style question for the technical interview