Pergunta de entrevista da empresa Google

Encountered a machine learning question, not coding at all