I was going through the k-means Wikipedia page. Based on the algorithm, I think the complexity is O(n*k*i) (n = total elements, k = number
O(n*k*i)
n
k
The problem is NP-Hard because there is another well known NP hard problem that can be reduced to (planar) k-means problem. Have a look at the paper The Planar k-means Problem is NP-hard (by Mahajan et al.) for more info.