Ericsson interview question

Write code for K-Means algorithm.