Pregunta de entrevista de Orange Health Diagnostic Lab

It was a "Hard" leetcode problem to solve.