Question d’entretien chez Huawei Technologies

How to write a k-means algorithm