John Macdonald wrote: > O > No algorithm can be O(1). At best it can be O(n) on the number > of lines. > > We said O(1) *memory* use, on the number of lines. Yes, we're making the implicit assumption that lines are reasonable. The algorithm's complexity is indeed O(n), on the number of lines. Max