Apple interview question

Implement certain basic ML algorithm from scratch in python.