Is it possible to use k-means algorithm with just one vector Suppose I have a vector $X = (x_1, x_2 , . . . ,x_n)$, $x_i$ is the maximum of $X$ and $x_k$ is the minimum. Is it possible to use k-means algorithm to cluster the values in vector $X$ into two cluster. First, the values which are near to maximum value and the other cluster includes the values which are near to minimum value? 
If not, Is there another algorithm can do that task? 

Thank  you
Certainly possible. You can think of it in the way you described but I would say it just becomes an adaptive thresholding assuming a bimodal distribution: We admit that there are two main modes in the data and we try to identify those by grouping the values around the means of the clusters. These groups form clusters. The means are positioned such that each element contributes to the average of the cluster it belongs and thus creating a mode nearby. 
It is almost sure that the minimum and maximum will go to separate clusters.