> > 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).

O(N)*O(1) = O(N)

you can probably get me on how I expressed this, but not
on the fact it's O(N).

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Reply via email to