Described the algorithm.