Order Notation in Practice

By Roger Orr

Many of us are familiar with the "Big O" order notation for giving an idea of the complexity of algorithms; for example the C++ std::sort function is described as "N logN". But sometimes this can seem a little unconnected to the task of actually writing code.

I'll use some examples where there are multiple ways (with different complexity measures) of solving the same problem to explore a few questions, such as:

- What does complexity notation actually mean?

- What does this measure *not* tell us?

- How important is this in practice?

- What other considerations are also important to consider?




Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.