That interesting notation used to describe how long a loop will take.
Neil Cerutti
neilc at norwich.edu
Mon Oct 4 21:07:46 CEST 2010
On 2010-10-04, MRAB <python at mrabarnett.plus.com> wrote:
> On 04/10/2010 19:38, Tobiah wrote:
>> It gets used here frequently, but not
>> having majored in programming, I'm not
>> familiar with it. One might say:
>>
>> Don't do it that way, it will result in O(n**2)!
>>
>> Or something like that. I read this to mean
>> that the execution time varies with the square
>> of the number of iterations, or items being sorted
>> etc..
>>
>> I want to google this, but I'm not sure what
>> keywords to use. Is there a wikipedia article about this
>> subject? I imagine that it has a concise name.
>>
> It's called the "Big O notation".
The web version of the book "Data Structures and Algorithms with
Object-Oriented Design Patterns in Python" contains a an
explanation in the chapters Algorithm Analysis and Asymptotic
Notation.
http://www.brpreiss.com/books/opus7/
--
Neil Cerutti
More information about the Python-list
mailing list