Algorithms class.