Frequent algorithm.