Journal: J. Algorithms