I am trying to implement the K-mean analysis with the Standard algorithm.
My implementation seems to work, but I noticed some strange behavior. If the k is close to half of the length of the list to be analyzed, I will get a set that is empty. I am not sure if it is the correct behavior.
I think the worst case is k equal to the length of the list, and each result sets has only 1 element. Empty result sets will happen if k is greater than the length of the list, but it is an invalid situation.