Micron Technology interview question

code and explanation of machine learning algo