numerical experiments

How long does it take to find a number in a list of numbers?

Jim Mahoney | cs.bennington.college | MIT License | Feb 2022

Which is faster, linear or binary search?

Well, the main() routine in searching tries them both.

Clearly binary search is much faster. But what is their O() behavior? Let's do some numerical experiments, make some plots, and see.

Are we having fun yet?