alg icon indicating copy to clipboard operation
alg copied to clipboard

Better `eventual_period`

Open andrejbauer opened this issue 12 years ago • 0 comments

It seems that eventual_period in unary_invariant and binary_invariant is needlessly quadratic time. If we keep track of when we saw each element, then when an element re-appears, we will instantly know that we already saw it. So the complexity ought to be linear.

andrejbauer avatar Oct 20 '13 06:10 andrejbauer