3M interview question

Write a code for k-means clustering