[Jprogramming] Membership using interval index

Raul Miller rauldmiller at gmail.com
Thu May 21 19:05:04 HKT 2009


On Wed, May 20, 2009 at 11:34 PM, Roger Hui <rhui000 at shaw.ca> wrote:
> is knowing when to use which algorithm.  As the
> benchmarks in a previous msg shows, for some
> arguments x i. y is (O #x)+(O #y) . If x is sorted,
> then it can be O (#y)*2^.#x if you use I. (binary search).
> Between these two orders there is a crossover point,
> and it is not trivial to know when to switch.

If we go by "anything less than a factor of 2
is not worth bothering with", does this become
trivial?

Thanks,

-- 
Raul


More information about the Programming mailing list