Pregunta de entrevista de Bloomberg

Leetcode question on machine learning