Big-O notation
Steven Taschuk
staschuk at telusplanet.net
Wed Apr 16 17:54:38 EDT 2003
Quoth A. Lloyd Flanagan:
[...]
> This mathematical analysis of an algorithm's behavior (and best-case,
> average, and worst-case performance) can be trivial. For example, x +
> 1 is O(1). [...]
I would have thought it's O(log x), due to the possibility of
carries.
--
Steven Taschuk staschuk at telusplanet.net
"Study this book; read a word then ponder on it. If you interpret the meaning
loosely you will mistake the Way." -- Musashi, _A Book of Five Rings_
More information about the Python-list
mailing list