Pregunta de entrevista de Epic

Leetcode type Coding challenge of medium - hard difficulty.