1 dimesional and 2 dimesional K-Means clustering algorithm.