Edvard Majakari wrote: > I realized that, but maybe I should've pointed it out too. For the OP if > he/she is unaware - notation O(N^2) (big O n squared) means the computing time > of the algorithm increases exponentially (where exponent is 2) relative to the > size of the input. Normally this is called a polynomial, rather than exponential increase. Exponential increases are typically of the form (C^N) (they are all equivalent). Polynomial times are hallways characterized by their largest exponent, So you never call something O(N^3 - N^2) Since, as N gets large enough, The N^2 term shrinks to non-existence.
http://en.wikipedia.org/wiki/Exponential_time > ... generally one should avoid using exponential O(n^k) (where k > 1) Again polynomial, not exponential time. Note that there is no polynomial time algorithm with (k < 1), since it takes O(n) time to read the problem. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list