The O(n) or O(n^2) is called 'Big-O notation'. It is used in the field known as 'Computational Complexity Theory', specifically when analysing the complexity of algorithms.

It basically tells you how 'efficient' the algorithm is, in the best, worst and average case.

Eg, the bubble sort algorithm has a complexity of O(n^2), therefore to sort 100 numbers it will take 100^2 (10000) iterations to complete, so bubblesort isn't a particularly useful sorting algorithm.

Do some googling for 'complexity analysis' or similar and you'll find lots of information.

Last edited by DJBMASTER; 04/03/10 19:58.