Pregunta de entrevista de ORMAE

Coding questions, Machine Learning algorithm pseudo answer