Pregunta de entrevista de Epic

Programming question, would say leetcode medium