This document discusses and provides code examples for the K-means clustering algorithm. It includes pseudocode that describes the basic K-means algorithm with complexity of O(k*n/p). It also provides code examples for implementing K-means in SQL, R, Java MapReduce, and Java reducers.