On Sun, Mar 10, 2002 at 11:11:00PM +0000, Jonathan E. Paton wrote:
> > > A lazy sort can be done in n time, easily:
> > > 
> > > @highest;
> > > foreach element {
> > >    if (element > lowest in @highest) {
> >                    ^^^^^^^^^^^^^^^^^^
> > You haven't kept @highest sorted, so there is another
> > factor of n.
> 
> Nope, not so.  @highest is of a fixed size, and hence
> requires a fixed amount of time to sort.  That's O(1).

You're right, Sorry.

Andrew

Reply via email to