Uber interview question

write K means clustering algorithm from scratch